cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 gpio clamping

pietrek --
Associate
Posted on January 14, 2017 at 14:30

I have stm32 gpio pin connected through 5k resistor to the 12V supply. What voltage can I expect on the pin depending on the gpio configuration and processor model? Is there any internal clamping in the MCU?

Do I need external clamping diodes?

4 REPLIES 4
S.Ma
Principal
Posted on January 14, 2017 at 15:17

This is far beyond 5V tolerant I/Os of the datasheet guaranteed specifications... Usually a resistor divider should be applied to shift down the voltage.

T J
Lead
Posted on January 14, 2017 at 23:10

This will destroy the pin, you must use the resistor divider as suggested above or use transistor signaling (preferred).

To answer your question:

The voltage will be shunted through a pin protection diode to Vcc,

This diode will conduct at  0.3- 0.6V  until it heats up... and blows open

The pin will sit at Vcc + about 0.6v,,,,,,,,,,,, 0.7,,,,,, 0.8,,, 1v, 2v and pssssh the diode evaporates.

Now the pin is exposed to 12v at low current, the output Fet will fail and pssssh your pin is disconnected from the die.

Other than that you should be ok.

T J
Lead
Posted on January 15, 2017 at 00:56

no.

you must use the divider.. it is simple

12vpin

2k ohm to uProcessor pin to 1k ohm to ground

Vout = 1/3 Vin = 4V max.

it will never fail.

8v pin will fail sometime.

Posted on January 15, 2017 at 00:50

Is this behaviour different on 5V tolerant pins? I tried it on my F446RE on such pin in input state and noticed ~8V on the pin. Now it seems to work fine.