cancel
Showing results for 
Search instead for 
Did you mean: 

The behavior of the​ gpio pin when powering on and powering off

diverger
Senior

This question may applied to the whole STM family and maybe pure hardware related, but I expect someone can give some clues.

  1. May I safely assume the gpio pins are ​high impedance when powering on?
  2. If I set pin to output, and output a high. Then, the power supply goes down. I expect the output will track the power supply till some point, that the pin can't retain output state anymore. Am I right? If so, when the point will occur, what's the supply voltage then?
  3. Similar to above, but this time set the pin low. What's the point I can't safely assume the pin is low?

Thanks.​

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> May I safely assume the gpio pins are ​high impedance when powering on?

Most pins are in input mode, which is floating. Some pins associated with JTAG/SWD are not floating.

> If I set pin to output, and output a high. Then, the power supply goes down. I expect the output will track the power supply till some point, that the pin can't retain output state anymore. Am I right? If so, when the point will occur, what's the supply voltage then?

Yep. The brown-out reset (BOR) is configurable and kicks in at various states, but generally around 1.8V. Once in reset, pins are in their reset state.

> Similar to above, but this time set the pin low. What's the point I can't safely assume the pin is low?

Same as above.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

> May I safely assume the gpio pins are ​high impedance when powering on?

Most pins are in input mode, which is floating. Some pins associated with JTAG/SWD are not floating.

> If I set pin to output, and output a high. Then, the power supply goes down. I expect the output will track the power supply till some point, that the pin can't retain output state anymore. Am I right? If so, when the point will occur, what's the supply voltage then?

Yep. The brown-out reset (BOR) is configurable and kicks in at various states, but generally around 1.8V. Once in reset, pins are in their reset state.

> Similar to above, but this time set the pin low. What's the point I can't safely assume the pin is low?

Same as above.

If you feel a post has answered your question, please click "Accept as Solution".
berendi
Principal

Check the reset values of the GPIO registers in the reference manual to see which pins have pullup or pulldown enabled.