cancel
Showing results for 
Search instead for 
Did you mean: 

hey everyone!

Ala
Senior
 
1 ACCEPTED SOLUTION

Accepted Solutions

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)

View solution in original post

4 REPLIES 4
Ozone
Lead II

I'm a bit confused. Doesn't return HAL_GPIO_ReadPin() just a logical state (High/Low) ?

you're right. I then tried ADC but the results didn't change:(

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)

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