Skip to main content
Indois
Associate III
May 13, 2021
Question

Check if data is received through USART

  • May 13, 2021
  • 1 reply
  • 591 views

Hello,

I would like to check if any data is received through USART and then use that data further in the program. I am using STM32L0 series MCU and Low Layer libraries in STM32CubeIDE environment. Are there any simple ways to code that?

Thank you.

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
May 13, 2021

Check the status register, use interrupts? Pretty basic stuff.

The UART holds a single character, so need to clear it as it arrives so it doesn't overrun.

Complexity comes with how you manage the data into a buffer, and process it.

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