cancel
Showing results for 
Search instead for 
Did you mean: 

prevent peripherals being automatically reset during STM32 user BL upgrade code process?

Tokit
Associate II

During the user-defined BL upgrade process of the STM32, is it possible to keep an IO pin, which has already been pulled high in the user code, at a high level throughout the entire sequence of steps: 'jumping from the user code to the BL, erasing and writing the flash, and then jumping back to the user code after the upgrade is complete'? This IO pin is not used during the upgrade process. The essential requirement is to avoid resetting the peripheral states during the BL upgrade process.I noticed that my IO pin was automatically reset after jumping from the user code to the user-defined BL code.

1 REPLY 1
TDK
Guru

The bootloader is in ROM and its behavior cannot be changed. If it resets a pin, no way around that.

If you wanted to do some reverse engineering, you could probably figure out where the specific bootloader you're using is located and jump there instead of the general bootloader address. Probably this would preserve pin states.

More info on the bootloader you're using, the peripheral/pin you're using keeping high would be helpful.

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