2021-09-02 07:15 PM
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.
2021-09-02 07:37 PM
This is possible.
Try disabling continuous conversion. If that doesn't work, try enabling scan conversion.