Showing results for 
Search instead for 
Did you mean: 

Using bootloader GO command with BOOT0 always asserted


I am using the I2C bootloader on STM32L431, in a system where another host CPU exists. I would like to minimize the number of host GPIO needed to manage entry to bootloader mode. (Currently the host is controlling the BOOT0 and RST# pins). I would like to keep BOOT0 always asserted so STM32 boots into bootloader every time. The host would them command a jump to the application using the GO command.

With BOOT0 asserted, I find that the STM32 always jumps back into bootloader after issuing GO 0x08000000. Is that expected? I would have expected the BOOT0 check to be done by the bootloader code only at POR. I would expect that using the GO command to jump directly to the application reset vector 0x08000004 would bypass this checking of the state of the BOOT0 pin. Is there some way to accomplish this?



The "code" doesn't check it.

Most of the BOOT pin functionality is done at a hardware level, where it controls the memory mapped/shadowed at address ZERO. Notionally FLASH, ROM or RAM (see SYSCFG)

ie the Boot Loader's Vector Table is always present.

You'd have to relocate the vector table on CM0+ and CM4 devices, and on CM0 ones you'd need to reconfigure the mapping to place RAM at address ZERO, and then copy your desired vector table into the first 48 or 192 bytes of RAM

Watch also for any Watchdog that the loader may have enabled.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..