cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 GPIO Default Initialization

markbell9
Associate II
Posted on July 25, 2012 at 17:49

What is the power on default for GPIO ?   I've looked in RM0008 and can't find it stated anywhere.

#stm32
4 REPLIES 4
Posted on July 25, 2012 at 17:59

What is the power on default for GPIO ?   I've looked in RM0008 and can't find it stated anywhere.

 

Doesn't it provide details of the reset state of the registers? As I recall most pin are going to be a floating input, with the exception of things like JTAG, BOOT0, OSC32 and the like. If you come in via the system loader, anticipate USB and USART1 pins might

have been initialized.

8.1.1 General-purpose I/O (GPIO), RM0008 Rev 11, Pg 148

''During and just after reset, the alternate functions are not active and the I/O ports are configured in Input Floating mode (CNFx[1:0]=01b, MODEx[1:0]=00b).''

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
markbell9
Associate II
Posted on July 25, 2012 at 18:17

Thanks!   Staring me right in the face and I didn't see it!

Mark

Posted on July 25, 2012 at 19:17

Thanks!   Staring me right in the face and I didn't see it!

No problem, I tend to skim the stuff too, plus they like to hide quirky stuff in the notes. I have a hard time keeping track of the nuances between the different series of parts. And I have half a dozen different revisions of RM0008

I mentioned the LSE (OSC32) pins, because they are quirky and relate both to the STANDBY exit type resets, and the fact that the LSI internal on the F1 won't run off the battery.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
kevinliao
Associate II
Posted on May 07, 2015 at 16:35

Hi,

I am working on STM32L152 cat1,

I have a question about the GPIO init state.

My circuit has the LED, the one side is VCC, the other side is stm32 gpio.

At some condition, I need soft reset the system.

At the reset moment, The LED has one flash, it on and off.

I think it's because the GPIO init state is input floating.

How can I do to keep the GPIO still high when reset?

Thank you.

Kevin