- Gained a deeper understanding of the different modes of an ADC
- Finally got Oversampling Mode to work
- Helpful Resources:
- STM32 ADC Tutorial + ADC Examples [Ultimate Guide] - Gives overview of ADC operation, and creator made guys on how to use every mode via interrupts, polling and DMA
- Getting started with ADC - stm32mcu
- STM32 ADC Oversampling Tutorial → ControllersTech
![]()
![]()
***After the for loop where I get the current raw ADC values for the voltages and currents, I have to add "HAL_ADC_STOP(&hadc1)" to get oversampling to work
Apparently, "Calling HAL_ADC_Stop(&hadc1) after the entire for loop ensures that before the $100ms delay and the start of the next while(1) cycle, the ADC peripheral is completely reset and put into a clean IDLE state. This allows the very first HAL_ADC_Start() of the new cycle (for $i=0$) to initialize the sequence correctly and produce valid oversampled data again."
Ghani Lawal

Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.