2025-03-19 4:44 PM
Hello,
I am trying to read from the ADC of an STM32H750VBT6 on a custom PCB at 16 bits and am getting a constant value of 32768 when sending data over USB. When factors like the number of bits is changed, the value also changes to be around half the max value even if the ADC input is re-connected to ground. I measured Vref and it is at 3.3V and I had a voltage divider circuit with 1.6 V going directly to the analog pin. Could there be an issue with the settings or how the ADC is being initialized?
Solved! Go to Solution.
2025-03-24 3:33 PM
Figured out what the issue was.
I ended up switching all my analog input pins into GPIO_Output pins and noticed that a lot of them were not outputting anything likely due to a bad soldering connection between the STM32 and the pads. A lot of the bad connections were also around Vref so it likely had a bad connection as well which led to the strange ADC readings. Re-heating some of the pads and adding some solder got me a good enough connection to be able to read from a channel.
2025-03-19 6:00 PM
Do you calibrate the ADC with HAL_ADCEx_Calibration_Start on startup? This is required.
Consider converting an internal channel like temperature or VREFINT to see if results vary.
2025-03-24 3:33 PM
Figured out what the issue was.
I ended up switching all my analog input pins into GPIO_Output pins and noticed that a lot of them were not outputting anything likely due to a bad soldering connection between the STM32 and the pads. A lot of the bad connections were also around Vref so it likely had a bad connection as well which led to the strange ADC readings. Re-heating some of the pads and adding some solder got me a good enough connection to be able to read from a channel.