cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO state when unprogrammed

Posted on April 05, 2018 at 07:31

Hello there,

Is there any set state of the GPIO's when the MCU (STM32L4 in my example) is unprogrammed? Or more likelly, when the MCU is in the system bootloader (I believe thats where the program counter is before I flash the MCU with anything). It seems to me that the GPIO are set as outputs HIGH or have pull-ups set.

I would appreciate all help.

#gpio
23 REPLIES 23
Posted on April 05, 2018 at 12:21

This is only a prototype for now, nothing produced yet. I will try ST and erratas. Thank you.

Posted on April 05, 2018 at 14:35

I should have think of that... Thank you guys.

Posted on April 05, 2018 at 13:49

It used to be the case that microcontrollers could draw a lot of current at start up but before any start up program had run and had configured the ports. That is because the CMOS input would be floating between 0 and 1 so that both mosfets were turned on. Two solutions were either use a high current power supply or add pull up resistors to all pins that could be floating at power up.

Different microcontrollers makers handle this differently now for example starting up with pull-ups turned on then the initialisation can change that. I be interested top hear if you get better adivice?

Also your second question is not relivant to this thread it is best to start a new question (thread).
Posted on April 05, 2018 at 14:14

Yep it's there , PB8 is used for CanRx in the bootloader, hence the pullup effect