2024-12-28 12:30 PM - edited 2024-12-28 12:33 PM
I am unable to obtain ADC values and would like some advice.
Here is the source code project.
https://github.com/katsumat/STM32CubeIDE/tree/main/workspace_1.16.1/ADCCalibration
PA0 is connected to GND, PA1 to Vdd, and PA3 to the output of a variable resistor.
The ends of the variable resistor are connected to Vdd and GND, ensuring an output range of 0 to 3.3V.
The input voltages for PA0, PA1, and PA3 are as follows:
Here are the results after setting a breakpoint and checking:
The variable did not hold any value.
2024-12-28 12:55 PM
Look at the generated config code in your main.c lines 246 ff and copy that as closely as possible in your own configs. ADC_REGULAR_RANK_1 is not a 1, offset fileds shall be initialized, etc..
hth
KnarfB