cancel
Showing results for 
Search instead for 
Did you mean: 

Timer and uart does not work at the same stime

MTapu.1
Associate II

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,

5 REPLIES 5
Kamil Duljas
Senior III

You must deinitialize UART before jump to bootloader

Dudo

I have already done.

Kamil Duljas
Senior III

Could you paste your code related to deinitialize before jump to bootloader?

Dudo

HAL_UART_MspDeInit(&huart1);

//deinit other communication peripherals

HAL_RNG_MspDeInit(&hrng);

HAL_RTC_MspDeInit(&hrtc);

HAL_ICACHE_DeInit();

SCB->VTOR = (sIAPStartAddress);

JumpToBootloader();

Kamil Duljas
Senior III

Look at my implementation of jump to bootloader:

https://github.com/KamilDuljas/STM32-JumpToBootloader/blob/main/Core/Src/main.c

Dudo