Skip to main content
Konami
Senior
October 5, 2017
Question

UART Rx of Variable Length with Interrupt

  • October 5, 2017
  • 1 reply
  • 503 views
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
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
October 5, 2017
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..