cancel
Showing results for 
Search instead for 
Did you mean: 

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 。

User.100
Associate II

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 ?

3 REPLIES 3
User.100
Associate II

I use STM32L471VET6.​

Muhammed Güler
Senior III

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

KnarfB
Principal III

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

hth

KnarfB