STM32F09xx USART LIN break interrupt management using HAL drivers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-07 02:53 AM
Hi everyone,
I tried to manage the USAR LIN break detection interrupt using only HAL driver functions but I did not find a way to do that. I had to modify the file stm32f0xx_hal_uasrt.c adding some code to manage the LIN break interrupt.
Is there a way to detect the LIN break in my application without modifying the driver code?
This is the code I added to the aforementioned HAL driver file:
// At the beginning of the file, where other prototypes are placed
#if defined (USART_CR2_LINEN)
extern void HAL_UART_LINBreakCallback(UART_HandleTypeDef *);
#endif
//...
// Inside function HAL_UART_IRQHandler
#if defined (USART_CR2_LINEN)
/* UART LIN break has been detected ----------------------------------------*/
if(isrflags & USART_ISR_LBDF)
{
__HAL_UART_CLEAR_IT(huart, UART_CLEAR_LBDF);
/* Call the callback function to signal LIN break detection */
HAL_UART_LINBreakCallback(huart);
}
#endif /* USART_CR2_LINEN */
If the function is currently unavailable, is there a way to tell STM to add it to the official driver so I can use the CUbeMX without needing to patch it every time?
Thank you so much,
Diego
- Labels:
-
STM32F0 Series
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-06-27 12:06 AM
Ping...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-06 07:36 AM
Another ping.
It is very surprising the LIN break detection callback has not been added to the driver.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-06 08:13 AM
It seems no one else uses LIN break...
ping ST
Request timed out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-06 08:19 AM
...and Auto Baud Rate Flag/Error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-06 09:04 AM
Hello @CptHuk ,
Internal ticket 183583 (not accessible by community member) has been created for follow-up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-07 02:30 AM
Very good news!