cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing by UART in STM32F411RE

SAID_embadded
Associate II
 

After more debugging, the jump function works correctly (PC reaches 0x080208xx, SP and RST are valid), but the app never sends any UART message after jump — even with SystemClock_Config() completely commented out and only HAL_Init() + MX_UART_Init() remaining. The bootloader resets the clock to HSI before jumping. SCB->VTOR is set in SystemInit(). Linker is at 0x08020000. The app works perfectly when flashed directly at 0x08000000 via ST-Link. Something is killing the app immediately after the bootloader jumps but we can't figure out what — any ideas?
this is the project : 
https://github.com/said-sketch/Flashing-by-UART---STM32-Bootloader/tree/main

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

If PC is at 0x080208xx, user code is being executed. If it's not doing what you want, there's likely a bug in the code, either the bootloader or the user code.

General jump to X code is here:

How to jump to system bootloader from application ... - STMicroelectronics Community

Yours looks considerably different. You will need to reenable interrupts, among other things.

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

View solution in original post

2 REPLIES 2
TDK
Super User

If PC is at 0x080208xx, user code is being executed. If it's not doing what you want, there's likely a bug in the code, either the bootloader or the user code.

General jump to X code is here:

How to jump to system bootloader from application ... - STMicroelectronics Community

Yours looks considerably different. You will need to reenable interrupts, among other things.

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

thanks bro i really i fix it