2025-09-08 2:13 AM - last edited on 2025-09-08 2:58 AM by mƎALLEm
Hi,
I'm already aware of the application note from https://www.st.com/resource/en/application_note/an5354-getting-started-with-the-stm32h7-series-mcu-16bit-adc-stmicroelectronics.pdf but as it does not cover STM32H72*-MCUs, I have to afraid I need to ask it here.
I have configured some ADC-stuff for 16 bit data sampling in CubeMX but now get incredible large offsets, even when the ADC-pins are connected to GND directly. That offset is in range 2000..4000 and very instable, means floating about the full range (I except it not to be a noise-problem as for testign the pin is pulled to GND directly).
What I have configured in CubeMX:
VREFBUF-mode to internal voltage reference
Trimming Mode: factory trimming
Internal voltage reference scale: SCALE2 (around 1.8V as I expect input voltages in range 0..1,8V)
The ADC's are used without oversampling, asynchronous clock-mode, divided by 4. The clock to the ADC's is at 64 MHz (may be too high?)
ADC is running in independent mode, no continuous conversion and software-triggered start of conversion.
At the very beginning, prior to starting the ADCs, I call
HAL_ADCEx_Calibration_Start(&hadc1,ADC_CALIB_OFFSET_LINEARITY,ADC_SINGLE_ENDED);
HAL_ADCEx_Calibration_Start(&hadc1,ADC_CALIB_OFFSET,ADC_SINGLE_ENDED);
So...what could be missing? Anything to check to find the problems?
Thanks!
Edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code
Solved! Go to Solution.
2025-09-08 7:00 AM
Yes. Two capacitors, as outlined in the datasheet and elsewhere.
How to use VREFBUF peripheral on STM32 MCUs and MPUs - Application note