2022-04-05 04:51 AM
I have multiple channels that I am trying to read from. I want to try both DMA and Interrupt mode.
Does the callback follow the EOC flag, and therefore follow the 'End of Conversion Selection' setting in Cube (to which I have set to 'at the end of single channel conversion')? If so, does that mean when I call HAL_ADC_GetValue (say from this callback), I will be getting the result of the channel that has just been converted?
For DMA I understand that HAL_ADC_ConvHalfCpltCallback is called when the chosen buffer I have given it is half full. So does that mean HAL_ADC_ConvCpltCallback is called when the buffer is completely full and not when a singular channel or all channels has been converted?
Solved! Go to Solution.
2022-04-06 07:26 PM
In DMA mode, the EOC flag isn't used. HAL_ADC_Conv(Half)CpltCallback is called on the DMA's HT and TC flags.
Unsure about IT mode offhand, but you could look at HAL_ADC_IRQHandler and follow the logic.
2022-04-06 07:26 PM
In DMA mode, the EOC flag isn't used. HAL_ADC_Conv(Half)CpltCallback is called on the DMA's HT and TC flags.
Unsure about IT mode offhand, but you could look at HAL_ADC_IRQHandler and follow the logic.