2023-04-28 01:04 AM
Hello,
In my code there are custom bootloader part and user application part. I init watchdog timer and refresh watchdog timer in the bootloader part and user app part. The code goes to user app from bootloader by jumping address. Likewise, The code goes to booloader part from user app part bu jumping use app address. There is no problem when the code jumping from bootloader part to user app part. But there is a ridiculous problem when it jumping from user app to bootloader part. The problem is it stuck in uart interrupt after uart initialization in the bootloader part. When ı look at interrupt flag, I see uart frame error is set. How to overcome this problem.
Sincereley,
2023-04-28 02:20 AM
You must deinitialize UART before jump to bootloader
2023-04-28 04:04 AM
I have already done.
2023-04-28 04:13 AM
Could you paste your code related to deinitialize before jump to bootloader?
2023-04-28 04:24 AM
HAL_UART_MspDeInit(&huart1);
//deinit other communication peripherals
HAL_RNG_MspDeInit(&hrng);
HAL_RTC_MspDeInit(&hrtc);
HAL_ICACHE_DeInit();
SCB->VTOR = (sIAPStartAddress);
JumpToBootloader();
2023-04-28 04:29 AM
Look at my implementation of jump to bootloader:
https://github.com/KamilDuljas/STM32-JumpToBootloader/blob/main/Core/Src/main.c