cancel
Showing results for 
Search instead for 
Did you mean: 

adc dma reading

yang hong
Associate II

I am using 6 channels adc with 46uSec sample rate. the reading is pretty good with dma. and I use TIMER trigger adc reading and get data from dma call back function. but every time I only get one sample for each channels, it is possible to set multiple samples for each channel back to dma, so I can reduce dma Interrupt. For example, I can have one trigger generated by TIMER output channel with 46uSEC, but DMA will collect 2 or 4 samples for each channels, then trigger dma complete conversion call back, so I significantly reduce conversion complete call back interrupt.

Thank you.

2 REPLIES 2

DMA does not care what is the source of data, it just moves data whenever they are available. If you set DMA to move say 1000 pieces of data, it will not interrupt you until those 1000 pieces are all collected.

JW

TDK
Guru

Increase the last argument of the HAL_ADC_Start_DMA function to whatever buffer size you want. It does not need to be the number of channels you're converting.

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