2025-05-23 12:48 PM
I can c in RM0033 (Rev9) Figure 18, that PA2 is connected with low impedance to a diode to V_DD, if PA2 is configured as analog input...
In Doc ID 15818 Rev 9 I see that R_ADC is at least 1.5kR...
If I connect PA2 in analog mode directly to 5V: Would I create a high current through that diode to V_DD (in my case 3.3V)? Or would the current be less than 1mA (1.4V/1500)? Google's Gemini and DeepSeek say, that that would damage the ADC or its MUX...
In RM0033 (Rev9) Figure 13 it looks like, I can still read the analog value on PA2, if PA2 is configured as digital output (open drain and BSRR|=(1<<2)).
Should I connect PA2 via 50kR to the difficult voltage? I cannot use a voltage divider, because that would interfere with the external pull-up resistor at PA2... I try to read CC1 of a USB-C host port... and DeepSeek says, that the USB-C device might possibly decide to connect CC1 to 5V, although I hoped, that the USB-C cable would not allow that...
Solved! Go to Solution.
2025-05-24 11:26 AM - edited 2025-05-24 1:15 PM
Dear @RRIDDICC ,
as Explained above if the pin GPIO is configured in Analog Mode , maximum VIN is VDDA/VREF+ + 0.3V . Exceeding that value , a physical damage may happen on Our Analog Circuitry and so whole MCU . Have a look here :
Have a good day,
STOne-32
2025-05-23 4:05 PM
Why not use it as a digital input instead? Dont see analog mode being necessary here.
Datasheet will have limits allowed in analog mode.
2025-05-23 4:17 PM
>what if PA2=5V in analog mode?
cpu is dead.
2025-05-24 11:26 AM - edited 2025-05-24 1:15 PM
Dear @RRIDDICC ,
as Explained above if the pin GPIO is configured in Analog Mode , maximum VIN is VDDA/VREF+ + 0.3V . Exceeding that value , a physical damage may happen on Our Analog Circuitry and so whole MCU . Have a look here :
Have a good day,
STOne-32
2025-05-24 12:59 PM
CC1 and CC2 can have different voltage levels in the beginning... e. g. appr. 1.7V, which would not allow me to detect, if a device showed up, because VIL is less than 1V at VDD=3.3V...