Skip to main content
Associate
October 25, 2023
Solved

SMT32L4xx blocked by bootloader

Hi all,

I'm using stm32l431 and met a problem as below.

After power up a new stm32l431 board which had not been programmed before, the MCU enter bootloader progam and the PC value is 0x1FFF xxxx.  Downlaod my own code to MCU but the code and not run.

Then, erase the MCU flash by "STM32Cube progammer", the MCU can work.

BTW, boot0 and RESET pin connect correctly.

This topic has been closed for replies.
TDK
TDKBest answer
October 25, 2023

If you want STM32CubeProgrammer to run directly after downloading, disconnect, reconnect, and then disconnect.

Also, the empty check mechanism is read on power-up, not reset. You either have to power cycle it or reload the option bytes. See here for more info:

https://community.st.com/t5/stm32-mcus/empty-check-mechanism-on-stm32/ta-p/49369

 

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

3 replies

ST Employee
October 25, 2023

Welcome @WYWF to ST Community, 

The bootloader is activated by applying some patterns

Please check Table 2. Bootloader activation patterns in AN2606

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
TDK
TDKBest answer
October 25, 2023

If you want STM32CubeProgrammer to run directly after downloading, disconnect, reconnect, and then disconnect.

Also, the empty check mechanism is read on power-up, not reset. You either have to power cycle it or reload the option bytes. See here for more info:

https://community.st.com/t5/stm32-mcus/empty-check-mechanism-on-stm32/ta-p/49369

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
WYWFAuthor
Associate
October 26, 2023

Thanks for your reply, I fixed this issue by modify 'Option bytes'