2021-06-01 08:41 AM
2021-06-02 12:08 AM
the DMA automatically interleaves the ADC values.
It will fill (as a circular buffer if configured that way ) the array you pass as an argument, no matter the length untill you stop it.
uint32_t ADCReadings[1024];
//DMA will take hadc1 readings(interleaving channels) and store them inside ADCReadings array, the circular buffer created has legth 1024
HAL_ADC_Start_DMA(&hadc1, (uint32_t*) ADCReadings, 1024);
DMA will fill ADCReadings as follows: (if 4 channels from adc are activated)
.............
1024.ADCReadings[1023]= value from 4rd channel
2021-06-02 06:34 AM
Thank you TDK.
You and Javier both gave me the same guidance.
I apprecieate your help.
SR
2021-06-02 06:36 AM
This will work very well for my needs.
Very nice explanation.
Thank you Javier.