Timer and uart does not work at the same stime
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-28 1: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,
- Labels:
-
Bootloader
-
TIM
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-28 2:20 AM
You must deinitialize UART before jump to bootloader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-28 4:04 AM
I have already done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-28 4:13 AM
Could you paste your code related to deinitialize before jump to bootloader?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-28 4: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();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-28 4:29 AM
Look at my implementation of jump to bootloader:
https://github.com/KamilDuljas/STM32-JumpToBootloader/blob/main/Core/Src/main.c
