cancel
Showing results for 
Search instead for 
Did you mean: 

1.UART Serial available function ? 2.Serial Flush Function ? 3. Serial Printf Function ?

PPati.18
Associate II

Working On STM32 Nucleo-L476RG board.

STM32Cubemx and Atollic Truestudio Im using for code development.

I have following questions Related to UART and HAL Functions...!

1.UART Serial available function ?

  • we have any function like arduino have serial.available() function to know serial have data or not. finding HAL functions.

2.Serial Flush Function ?

  • we have any function like arduino have serial.flush() function to erase all data from serial buffer. finding HAL functions.

3. Serial Printf Function ?

  • we have any function like arduino have serial.print() function to print all type of data on serial like char, string , int values. finding HAL functions.

Please Help me out. i just started STM32 programming.

any example code or link

1 REPLY 1
Piranha
Chief II

No, no and no. And that's good, because Arduino API is at schoolboy level. HAL USART API is described in file stm32l4xx_hal_usart.c and internet is full of examples:

https://visualgdb.com/tutorials/arm/stm32/uart/hal/

https://riptutorial.com/stm32/example/29940/echo-application---hal-library

https://www.waveshare.com/wiki/STM32CubeMX_Tutorial_Series:_USART