HAL_UART_ErrorCallback always shows huart->ErrorCode value as Zero
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-17 4:45 AM - edited ‎2024-01-18 2:54 AM
Hi there, using the callback function HAL_UART_ErrorCallback, I am receiving UART errors. However, what is odd is that handle->ErrorCode has 0 value always. That is, there is a mistake but no error code. I believe the STM32L431 UART driver contains a logical mistake.
- Labels:
-
STM32Cube MCU Packages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-17 5:48 AM - edited ‎2024-01-17 3:04 PM
Please include your chip part number in your post.
Set a breakpoint in HAL_UART_ErrorCallback and look at the call stack to see where and why the error callback is being called.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-18 2:57 AM
Hi TDK thank you for response. I have attached the images for your reference in word file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-18 6:22 AM
Yeah, you could be right. That's pretty complicated for me to trace the logic. But now that you know what happens, and that ErrorCode is cleared when you restart the transfer, you can use that info to find out what the error is and fix the issue.
