Synchronous DMA triggers on LPC55xx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Synchronous DMA triggers on LPC55xx

474 Views
JPE
Contributor III

Hi,

we are using the AOI0 to trigger the DMA0 and move the contents of the ADC1 ResultFIFO1 to a RAM buffer.
This works fine and allows us to do some oversampling of 2 ADC inputs and average the signals.

Now we would like to extend this oversampling with an additional ADC input which is sampled to ADC1 ResultFIFO0.
I have defined a new DMA channel for the new DMA request "ADC1 FIFO 0" where the source start address is set to &(ADC1->RESFIFO[0]) and the destination address to my new buffer in RAM.
The original DMA channel has received priority 2, while the new channel has been assigned priority 4.

The new DMA request is triggered by the same signal (AOI0_OUT0) as the original DMA request, but when executing this configuration on the hardware, this gives some unexpected results on both the original and the new samples when I check the contents of the RAM-buffers with Freemaster.

The values from "ADC1 FIFO 1" transferred by the original DMA channel seem to be switched every once in a while, so that the value from "sample A" appears in the RAM-buffer where the value for "sample B" should be located and vice versa.
In between these "glitches", the sampled values look OK for anything between 1 and 50 samples.
An explanation could be a missing trigger of the DMA, where a sample will be missing and therefor the contents of the RAM-buffer are not aligned properly.

  • Can this be caused by using the same triggger signal (AOI0_OUT0) for the two DMA requests?
  • Shouldn't the DMA channel priority guard against this interference?
  • Is there another way to configure the LPC to what we would like to achieve?

 

Kind regards,
Jörn

Labels (1)
Tags (1)
0 Kudos
2 Replies

382 Views
JPE
Contributor III

Hi XiangJun,

were you able to make your test?

BR. Jörn

0 Kudos

427 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I see your scheme to trigger DMA to transfer data from ADC FIFO to memory.

Our ADC-DMA example for LPC5536 uses DMA0-Channel21 to transfer data from ADC FIFO to memory with request mode.

I will have a test in this week and check if your scheme is okay. The ADC0_IRQ event functions as an input of AOI0, the AOI0 output signal triggers DMA to transfer data from ADC FIFOx to memory, in this way, you can use any DMA channel to transfer.

BR

XiangJun Rong

0 Kudos