Skip to main content
Visitor II
April 28, 2023
Question

Timer and uart does not work at the same stime

  • April 28, 2023
  • 3 replies
  • 1463 views

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,

    This topic has been closed for replies.

    3 replies

    Graduate
    April 28, 2023

    You must deinitialize UART before jump to bootloader

    MTapu.1Author
    Visitor II
    April 28, 2023

    I have already done.

    Graduate
    April 28, 2023

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

    MTapu.1Author
    Visitor II
    April 28, 2023

    HAL_UART_MspDeInit(&huart1);

    //deinit other communication peripherals

    HAL_RNG_MspDeInit(&hrng);

    HAL_RTC_MspDeInit(&hrtc);

    HAL_ICACHE_DeInit();

    SCB->VTOR = (sIAPStartAddress);

    JumpToBootloader();

    Graduate
    April 28, 2023