cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering the read timing of ADC when using DMA

FLast.5
Associate II

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 

1 REPLY 1
TDK
Guru

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".