Skip to main content
Visitor II
December 14, 2021
Question

We found some time the UART interrupt call back function (HAL_UART_RxCpltCallback) will shut down but the IRQ function (UART5_IRQHandler ) still working. Because we have add the counter in call back function and IRQ function 。

  • December 14, 2021
  • 3 replies
  • 981 views

We found some time the UART interrupt call back function (HAL_UART_RxCpltCallback) will shut down but the IRQ function (UART5_IRQHandler ) still working. Because we have add the counter in call back function and IRQ function , when the communication shut down, we check the IRQ function’s counter still has increase but call back function ‘s counter has not increase.

So may we have two request to ask?

  1. Is any STM MCU register flag or function can check the call back function alive and shut down reason? (we already implemented (HAL_UART_ErrorCallback) function but see the error call back function have not called but see the UART RX call back function not work.
  2. Is it possible come to our office to see the problem in real time ?

    This topic has been closed for replies.

    3 replies

    User.100Author
    Visitor II
    December 14, 2021

    I use STM32L471VET6.​

    Graduate II
    December 14, 2021

    The program follows the path below.

    interrupt occurs,

    The USARTX_IRQHandler() function is called,

    after (or before) your code runs HAL_UART_IRQHandler(&huartx); function is called,

    after some checks UART_Receive_IT(huart); function is called

    after some checks HAL_UART_RxCpltCallback(huart); function is called

    You need to find what is blocking the path by debugging

    Super User
    December 14, 2021

    Set a debug breakpoint in the IRQ handler and step through to see what happens.

    hth

    KnarfB