cancel
Showing results for 
Search instead for 
Did you mean: 

UART Rx of Variable Length with Interrupt

Konami
Senior II
Posted on October 05, 2017 at 21:30

I've seen a number of threads on there trying to find a workaround for the HAL library's inability to read a UART message of variable length. Is there any official fix to this yet, or is hacking the library still the only solution? Essentially I just want to have an interrupt trigger every time the UART receives a byte so I can buffer it and watch for an EOL or similar character.

#stm32l4-hal
1 REPLY 1
Posted on October 05, 2017 at 21:40

The interrupt does occur for every byte, your callback maybe at a decimated rate.

>>Is there any official fix to this yet, or is hacking the library still the only solution? 

Look, you can wait for a bloated solution, or just mix-n-match the portions of the library you want to use. It's not unduly hard to enable the USART RXNE interrupt, and manage the data on-the-fly.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..