2024-10-03 01:03 AM - edited 2024-10-03 01:06 AM
Good morning,
We designed a LED controller with the STM32C011. We exposed the BOOT0 PIN in our design as followed:
Now the first prototypes are potted in without access to the SWD interface and we want to update the firmware via the internal bootloader.
However we discovered after the PCB's has been potted in, that you first have to set the nBOOT_SEL to 0 in the option bytes via the ST-Link (or internal bootloader / firmware) before the BOOT0 pin functionality will become available.
I know it's a long shot, but is there any way to somehow still end up in the bootloader without any support from the firmware?
Anyway, let this be a warning for other people who want to relay on the BOOT0 functionality which for the STM32C0xx series first have to be configured in legacy mode via the option bytes.
PS. maybe the name should have been changed, to give people a hint that the default ST's BOOT0 eco system is not applied in this MCU.
2024-10-03 03:51 AM
Yes if the device il "empty" the bootloader will start always (if the BOOT_LOCK bit is not set) see 3.1.4 in RM0490:
So You should have the possibility to enter the bootloader for the 1. download of Your application, then your application has to set the nBOOT_SEL to 0, so You have legacy access to the bootloader via BOOT0.
Martin
2024-10-03 03:57 AM - edited 2024-10-03 03:58 AM
They where already programmed before they got potted in. So I was hoping that somehow via a hack (some flashes erase on high voltage for example, or maybe there is some SWCLK magic, I don't know...) I could erase the existing application and/or execute the bootloader anyway.
2024-10-03 05:21 AM
If the SWD pins are not available, and the option bytes are at default, and a program is in flash, there is no way to get back into the bootloader.