2022-04-26 08:52 AM
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.
Thank You!
Regards,
Malik
2022-04-26 10:01 AM
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.
2022-04-29 04:26 AM
@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?
2022-04-29 07:24 AM
Connect with SWD and change it. If you repurpose those pins, you'll need to connect before your program changes those pin functions.