STM32 UART receives Null character(\0) on reset.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-07 6:41 AM
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.
Observations:
- 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?
- Labels:
-
LPUART
-
STM32L0 Series
-
STM32L4 Series
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-07 8:40 AM
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.
hth
KnarfB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-07 8:45 AM
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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-07 10:44 PM - edited ‎2023-11-20 6:12 AM
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.
