How to configure DMA channel for ADC results

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User19909
Level 3
Level 3
First like received
If I configured ADC interrupts to be handle by DMA, the configuration parameters in DMA how should I choose the configuration parameters, to what are they related? ADC configuration or how can I make sure it is correctly configured to work properly.
Because currently I configured a destination address for the results of ADC to be written in, the DMA is overwriting in address before the defined address in the destination address and trashing these areas before the destination
0 Likes
3 Replies
teoBits
Employee
Employee
5 sign-ins 100 replies posted 50 replies posted
Hello, take a look at the DMA_ADC_Transfer_1_KIT_TC297_TFT example, it can be easily ported to TC3xx devices.
It also comes with a tutorial that explain in detail how to configure the DMA: Tutorial

hope it helps,
teoBits
0 Likes
User19909
Level 3
Level 3
First like received
Is there a required memory alignment for DMA to write? Because currently the DMA is writing in an address before the configured Destination address so i am quite confused
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
Yes - if you're using circular buffering, the buffer should be aligned. E.g., align a 1K circular buffer on a 1K boundary.
0 Likes