Dma transfer with ADC on LPC54608

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

Dma transfer with ADC on LPC54608

1,223 Views
giannigrondona
Contributor III

Hi

I used lpcxpresso54608_driver_examples_adc_lpc_adc_dma and the example work only if I have to tranfer to external memory only one acquisition form ADC

My question is :why to use  kDMA_MemoryToMemory in the function DMA_Prepare_transfer instead of Peripheral to memory? DAC register is not memory. After every single transfer from memory to memory the source address and the destination address are incremented, but AD address register must be always the same

Best Regards

Giovanni

Labels (1)
4 Replies

703 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Giovanni Grondona,

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.
The ADC is an exception, it use a trigger instead of a DMA request, so that's reason of choosing the kDMA_MemoryToMemory instead of kDMA_PeripheralToMemory.
However I'd like to say that demo is not strict, as you mentioned, the address of destination should keep same.
The demo is used to illustrate the ADC work with the DMA, meanwhile in the code, the initialization of the DMA would be done again and again after DMA transfer completes in the while loop, and according to testing result, this drawback is tolerable and it doesn't bring some huge errors either.

Have a great day,
TIC

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

703 Views
giannigrondona
Contributor III

Hi

Thank you for your answer. But In my application I have to acquire several acquisition ( about 1000 acquisitions) then after all the 1000 acquisitions I have to compute all data. So I have an hardware trigger which start the ADC acquisition (every millisecond, I used a match timer to set the DAC Trigger ) and I would have a DMA interrupt after 1000 acquisition and the destination address of DMA must increment every single transfer so I have to use a buffer contains 1000 acquisitions.

How can I do ?
Best Regards

Giovanni

0 Kudos

703 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Giovanni Grondona,

Thanks for your reply.

Please referring to this application, it's suit for your purpose.

DMA Ping-Pong application
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

703 Views
giannigrondona
Contributor III

Thank you I think it could be useful but I don't find an example for LCP54608 in SDK2.2. In your application the functions to initialize DMA are different from library function of SDK2.2 

Do you have some examples using ping pong for LPC54608?
Best Regards

Giovanni