2019-10-22 11:03 PM
2019-10-23 01:24 AM
I'm no Cube/HAL user, by the way.
But for all STM32 MCUs I know, the following points are valid:
- Vdd&/ Vdda max. is 3,6V
- the ADC reference voltage is less or equal to Vdda
- analog pins (including ADC) are not 5V-tolerant
- the ADC has a default resoltution of 12 bits, (not 10)
2019-10-23 01:07 AM
I'm a bit confused. Doesn't return HAL_GPIO_ReadPin() just a logical state (High/Low) ?
2019-10-23 01:12 AM
you're right. I then tried ADC but the results didn't change:(
2019-10-23 01:24 AM
I'm no Cube/HAL user, by the way.
But for all STM32 MCUs I know, the following points are valid:
- Vdd&/ Vdda max. is 3,6V
- the ADC reference voltage is less or equal to Vdda
- analog pins (including ADC) are not 5V-tolerant
- the ADC has a default resoltution of 12 bits, (not 10)
2019-10-23 01:34 AM
dear Ozone!
you saved the day!
you were right!
when I used 3.3 reference voltage, all went well:ok_hand:
also I changed the resolution to 10 or 8bits manually
thanks a :folded_hands: lot by the way