2021-06-18 10:36 AM
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.
2021-06-18 12:32 PM
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
2021-06-18 02:14 PM
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.