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 。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-13 10:44 PM
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?
- 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.
- Is it possible come to our office to see the problem in real time ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-13 10:45 PM
I use STM32L471VET6.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-13 11:56 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-14 12:27 AM
Set a debug breakpoint in the IRQ handler and step through to see what happens.
hth
KnarfB
