cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0B1KE System Bootloader Mode Entry

Malik1
Associate

Hello ST Community,

We are using STM32G0B1KE MCU in our project. The MCU firmware will be flashed from the Processor via the I2C interface between the processor and MCU.

As per AN2606, we have tried to activate pattern 11, but the system bootloader couldn’t be detected. At this time, we have identified our problem that the bootloader that always uses PB6 and PB7 pins for I2C in bootloader mode, but we used different pins for connecting I2C. So, we have connected the Processor I2C pins to PB6 and PB7, and not the i2c bootloader can be detected and we can access the bootloader from the processor.

After that, we tried to flash the firmware and we can successfully flash it. But after flashing the firmware if we tried to switch the MCU to system bootloader mode by activating pattern 11, The I2C bootloader was not detected(seems the system bootloader FW was not loaded). This is our issue right now. Kindly help us to resolve the issue.

Note:

We have activated pattern 11 by using the below way.

  1. Ensure nBoot1(bit) =1 and nBOOT0_SEL(bit) =0 by reading the 0x1FFF7800 memory address.
  2. Ensure Boot_Lock(bit) = 0 by reading the 0x1FFF7870 memory address.
  3. Set the reset pin to low
  4. Set the Boot0(pin) to high
  5. Set the reset pin to high

Thank You!

Regards,

Malik

3 REPLIES 3
TDK
Guru

The bootloader lives in ROM. If it worked one time, it should work again unless something in your setup has changed. In any case, the bootloader cannot be erased, and the hooks to jump to it after reset (pattern 11) are not changeable.

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

@TDK​ we found the issue that we missed to set the nBOOT_SEL(bit)=0 in code, that's the reason that the system bootloader was not detected after flashing the firmware.

I have another query that I have flashed a few boards with nBOOT_SET=1, so that it won't fall back to system bootloader mode. is there any way to recover from that?

Connect with SWD and change it. If you repurpose those pins, you'll need to connect before your program changes those pin functions.

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