Skip to main content
FLast.5
Associate II
Sep 3, 2021 2:15 AM UTC
Question

Triggering the read timing of ADC when using DMA

I am using ADC DMA to read 100 sample from 1 cycle input sine wave whose frequency is 1KHz . When we using ADC to read DMA, the DMA reads ADC continuously until buffer is full.

I want the DMA to read and store ADC data in buffer one at a time when it is triggered by update event.

When the timer update event triggers, I want the DMA to read and store ADC in index [0], when next update event trigger occurs, the DMA should store ADC in next index [1]. This process has to continue 100 times until buffer is full and interrupt is generated. Is this possible using DMA or should I use interrupt for this ?

To read 100 samples, I have set timer interrupt at 10us.

Right now from, what I have done, the DMA reads ADC continuously until buffer is full.0693W00000Dm3YTQAZ.png0693W00000Dm3YOQAZ.png 

This topic has been closed for replies.

1 reply

TDK
Sep 3, 2021 2:37 AM UTC

This is possible.

Try disabling continuous conversion. If that doesn't work, try enabling scan conversion.

"If you feel a post has answered your question, please click ""Accept as Solution""."