cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 internal I/O circuit

td
Associate II
Posted on February 25, 2016 at 09:22

Hello everyone,

i have a circuit where 8 I/O (5V tolarant)pins of my STM32F407(supply is 3.3V) are configured as inputs and are tied to 5V with a 10K pull-up resistor. The I/O as inputs work ok but when a configure them as outputs a have a voltage drop 1.7V on the pull-up resistor and current flows inside ...the microcontroller output pin... My question is, where does the current go? is it safe? Please note that i cannot change the 5V pull-up and the pin has to act as input and output due to the rest complicated circuit.

Thank you
2 REPLIES 2
Danish1
Lead II
Posted on February 25, 2016 at 11:07

When you ask a GPIO pin to be output-high, what happens is that a transistor between that pin and Vdd is turned on.

So if Vdd is 3.3 V then the pin will go to 3.3 V. And if you try to pull it higher than 3.3 V then the current you inject into that pin will end up on your Vdd rail.

My reading of the data sheet is that you must keep this current below 5 mA (which it will be with 10k).

And you also must be confident that the injected current will not pull Vdd too high (i.e. that the total injected current will never exceed the current consumed on the Vdd line by the processor and anything else - even if you sleep the processor - or you will need a regulator which can sink as well as source current!)

Mind you if you program the pins to be output low when sleeping then (a higher current) will end up on Vss which is safe.

Hope this helps,

Danish

td
Associate II
Posted on February 25, 2016 at 11:29

Very helpful thank you, its the answer i expected