2023-05-31 09:05 PM
Hello All,
MCU - STM32G0B0RET6 supports USB bootloader.
When I first connect my USB to my PC, it is recognised as "DFU in FS Mode". Then I flashed a simple GPIO control application code (*.elf) through USB, and after restarting the board, my PC no longer detects USB.
Is it necessary to include USB support in the application code to make the USB bootloader to work?
I have no idea what I am missing! Please advise.
Thanks & Regards,
VM
2023-06-02 03:58 AM
To get to the USB bootloader you either have to set BOOT0 pin or fuse and reboot, or have a boot switch in the startup code and some way to set this boot switch from the program. If you want to set this boot switch via USB, USB must run in the user code and provide a DFU endpoint.
2023-06-02 10:41 AM - edited 2023-11-20 04:16 AM
Hi @uwe Bonnes,
Thanks for your response.
I done flash erase, then the USB is detected in my PC as "DFU in FS mode" and i can able to program it. I hope this is expected behavior. But i do see issue only after flashing my application code, I can't get into a bootloader mode.
I tied BOOT0 to VDD and then power on the device, even in this case, USB DFU is not detected in my PC. I expected with BOOT0 to HIGH,makes the device into bootloader mode.
Do you have idea why it is not entering into a bootloader mode?
2023-06-02 01:41 PM - edited 2023-11-20 04:16 AM
Hi @uwe Bonnes ,
Configuring Flash option bytes "nBOOT_SEL (bit) to 0" resolved my issue.
This configuration decides the bootloader mode based on Boot0 pin value.
So, pressing the Boot switch and then triggering the Reset switch, puts the device now in bootloader mode.
2023-06-02 01:41 PM
Configuring Flash option bytes "nBOOT_SEL (bit) to 0" resolved my issue.