cancel
Showing results for 
Search instead for 
Did you mean: 

Lost of GPIO configuration once the bootloader is started

tingting
Associate II
Posted on January 27, 2016 at 14:46

Hi,

I am using the microcontroller STM32L0.

I configured two pins(PB5 and PB6) of the micro as outputs. And the PB5 is  in SET state and the PB6 is in RESET state.

To update the firmware , we use the bootloder. To enter in bootlodaer mode, we make a jump to its address.

But once the bootloader started, I lost the configuration of my two pins, and my RS232 transceiver cannot be ON. Because to activate the transceiver, I must have PB5  SET and PB6 RESET.

Is it normal that the GPIO configuration can be lost in bootloader mode?

Thank you

13 REPLIES 13
Posted on January 27, 2016 at 15:08

Have you consulted AN2606? Which 'L0 in particular do you use? AN2606 says:

PB6 pin: I2C1 clock line is used in open-drain mode.

for 'L07/'L08.

JW
tingting
Associate II
Posted on January 27, 2016 at 15:33

Yes. The PB6 is not used. I use STM32L051

Posted on January 27, 2016 at 16:53

Is it normal that the GPIO configuration can be lost in bootloader mode?

Yes, it knows nothing about your board or its configuration, and assumes it can write to whatever registers it wants and that they are in reset condition.

If you want control over things, you need to write your own loader.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
tingting
Associate II
Posted on January 28, 2016 at 09:31

Is it complicate to create a bootloader? I have never made a bootloader by my own.

And can we modify the preloaded bootloader? can I find the code of the STM bootloader somewhere?

pkumar1883
Associate II
Posted on January 28, 2016 at 14:55

Dear ttl,

The following link explains everything.

http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1920/PF262163?s_searchtype=partnumber

tingting
Associate II
Posted on February 01, 2016 at 16:06

Hi kk,

Thank you for your reply!

I modified the program, and I got the main menu.

But when I use YModem to download my program, it is always blocked at 0%.

Have you ever encountered this issue?

0690X000006036pQAA.jpg

Posted on February 01, 2016 at 17:55

Not sure you want to be sending .HEX, seem to think ST example expects executable binary code to be delivered.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
pkumar1883
Associate II
Posted on February 02, 2016 at 07:33

Dear ttl,

As I can see from your screen shot, you are sending .HEX file but if you are using ST IAP example it only accept .BIN file(

Clive1 also told the same

). So try with .bin file.

I tested this Ymodem file transfer with Hyperterminal.

tingting
Associate II
Posted on February 02, 2016 at 09:52

I tried the .bin file. It is blocked at 18,9 %.

0690X000006036zQAA.jpg