I am using 64 pin stm32f103RE, Keil and STM32Cube for my project, the problem is when I try to read ADC by polling or interrupt modes with HAL_ADC_GetValue(&hadc1), just a fixed number is returned (0xFF0F0000). AS the pin is float so some noise values must be shown instead.
I also tried ADC_GetConversionValue(ADC1) using CMSIS and Keil but the result was the same, for both polling and interrupt mode. What would be the reason, may it be something with ADC hardware problem?
What would be the reason, may it be something with ADC hardware problem
as every beginner you look for the hardware problems, compiler errors etc etc. You must remember - in almost 100% cases your code is wrong. Compiler and hardware is OK. Also do not ask questions without your code. \$\endgroup\$