Showing results for 
Search instead for 
Did you mean: 

STM32 UART receives Null character(\0) on reset.

Associate II

Project Details:

The project consists of two STM32 MCUs connected over UART (without any external pull up resistors). One STM32L4 MCU (LPUART1) acts as an AT master and other STM32L0 MCU (UART 1) acts as an AT slave. AT slave is configured to wake up from STOP mode on RXNEIE.


  1. I am receiving an extra NULL character in the AT master side during the first UART reception. I presume that since the AT master is initialized before the slave, the master is seeing a low to high transmission of the pin during slave UART initialization. But strangely i also observe this issue here and there in the transmission.

How to solve the problem, without adding pull up as the board is already fabricated?

Principal III

A missing pull-up could be added by configuring the UART pin with an internal pull-up. If the error persists, hook-up a cheap logic analyzer for analysis.



Can you recognize and ignore the extraneous character, and resync with the first valid data?

Check for framing or noise errors

Enable the internal pull up early, before enabling the USART

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

Thanks @KnarfB​  and @Community member​  for your valuable comments.

Should i use the pull up setting that comes with the UART configuration itself (As mentioned in the image below) or should if configure the pin as input with a internal pull up before UART initialization.