EmbeddedRelated.com
Forums

LPC23XX DMA

Started by Mark Butcher January 1, 2008
Hi All

Please could anyone with experience using the DMA controller in the
LPC23XX answer the following questions?

After studying the manual I have presently decided against the use of
the DMA controller due to several restrictions. I would like to know
whether I have understaood everything correctly and am not making a
false decision based on false interpretation.

1. memory<->memory copy. I like to integrate a DMA copy option in
memcpy() and memset() functions since it has proven to reduce such
actions by an interesting amount (for copy of larger data buffers it
can easily double the memcpy speed).

As I understand it, this works but only for memory in the USB memory
area. This would be quite impractical for general purpose use - is
this really the case?

2. UART<->memory transfers are not supported as far as I have understood.

3. Some other peripherals are supported but I have understood that the
memory <-> peripheral move can also only be from/to USB memory area.
Have I understood this correctly?
Assuming there is adequate space in the USB RAM area it may be
possible to specify that the peripheral drivers use this area for
their memory. I may implement this..(?)

Any comments?

Best regards

Mark Butcher

www.uTasker.com

An Engineer's Guide to the LPC2100 Series

Hi!

1. In User manual one cane really see that GPDMA accessible areas
include only USB and external RAM. If you have working example for USB
RAM why don't you just try to change source or destination address to
internal RAM. :) I don't have this board to try it.

2. Well... NXP focused on low price with lots of peripherials. But not
using DMA with more than two channels and DMA enabled peripherials
(such as UART, I2C, PWM and ADC) is just ... plain stupid. I know that
good DMA consumes a lot of silicon. But who needs multichannel high
speed ADC if you must copy the data via the CPU registers. In that
way, CPU gets constantly interrupted for request to copy data! Ah...
what a waste of CPU cycles. I've seen similar stupidity in other
micros and even DMA (TI for example).

3. I used DMA with LPC2378 but I used it with SSP to USB ram and from
USB ram to ethernet. USB wasn't used so why not use it?
Well...

--- In l..., "Mark Butcher" wrote:
>
> Hi All
>
> Please could anyone with experience using the DMA controller in the
> LPC23XX answer the following questions?
>
> After studying the manual I have presently decided against the use of
> the DMA controller due to several restrictions. I would like to know
> whether I have understaood everything correctly and am not making a
> false decision based on false interpretation.
>
> 1. memory<->memory copy. I like to integrate a DMA copy option in
> memcpy() and memset() functions since it has proven to reduce such
> actions by an interesting amount (for copy of larger data buffers it
> can easily double the memcpy speed).
>
> As I understand it, this works but only for memory in the USB memory
> area. This would be quite impractical for general purpose use - is
> this really the case?
>
> 2. UART<->memory transfers are not supported as far as I have
understood.
>
> 3. Some other peripherals are supported but I have understood that the
> memory <-> peripheral move can also only be from/to USB memory area.
> Have I understood this correctly?
> Assuming there is adequate space in the USB RAM area it may be
> possible to specify that the peripheral drivers use this area for
> their memory. I may implement this..(?)
>
> Any comments?
>
> Best regards
>
> Mark Butcher
>
> www.uTasker.com
>
Some typos were in my previous post (it's late and ... party on!)

> internal RAM. :) I don't have this board to try it.

I don't have my board with LPC2378 here right now.

> pidity in other
> micros and even DMA (TI for example).

DSP ... not DMA! :)
> 3. I used DMA with LPC2378 but I used it with SSP to USB ram and from
> USB ram to ethernet. USB wasn't used so why not use it?
>

USB peripherial was not used and why not use USB RAM for storage...
Regards,
Slawc
Hello Mark and everybody else,

I just did an experiment with GPDMA.

Memory to memory transfers work when both source and destination are
in either the USB memory range (0x7fd00000 to 0x7fd01fff), or the RTC
memory range (0xe0084000 to 0xe00847ff).

I did not test external memory (because my board does not have it).

Memory to memory transfers do not work when the source or the
destination is in the standard SRAM range (0x40000000 to 0x40007fff on
the LPC2378).

Most of this is in agreement with the User Manual. The only surprise
is that transfers to and from the RTC SRAM are supported.

Regards,
Thiadmer Riemersma
If I would have to guess than anything that is behind (as seen from the
arm core) an APB bridge will be accessable by GPDMA. The other stuff
(SRAM, FLASH and FIO) is to close to the core to allow multiple masters.

Regards,
Richard.
Thiadmer Riemersma (ITB CompuPhase) wrote:
> Hello Mark and everybody else,
>
> I just did an experiment with GPDMA.
>
> Memory to memory transfers work when both source and destination are
> in either the USB memory range (0x7fd00000 to 0x7fd01fff), or the RTC
> memory range (0xe0084000 to 0xe00847ff).
>
> I did not test external memory (because my board does not have it).
>
> Memory to memory transfers do not work when the source or the
> destination is in the standard SRAM range (0x40000000 to 0x40007fff on
> the LPC2378).
>
> Most of this is in agreement with the User Manual. The only surprise
> is that transfers to and from the RTC SRAM are supported.
>
> Regards,
> Thiadmer Riemersma
>
>