kender
Advanced Member level 4
I've got a question related to reconfiguring the ADC channels at runtime. How can I disable channels which aren't used at the given time?
In one part of my program ADC2 is reading channels 1,2,4 in scan mode with DMA. In another part of the program ADC2 is reading channel 9. I need to reconfigure the ADC channels at runtime back and forth.
I saw code examples which used ADC_RANK_NONE to disable channels [if I understood it correctly]. But the HAL for my microcontroller (STM32G4) doesn't define ADC_RANK_NONE .
In one part of my program ADC2 is reading channels 1,2,4 in scan mode with DMA. In another part of the program ADC2 is reading channel 9. I need to reconfigure the ADC channels at runtime back and forth.
I saw code examples which used ADC_RANK_NONE to disable channels [if I understood it correctly]. But the HAL for my microcontroller (STM32G4) doesn't define ADC_RANK_NONE .
Last edited: