cancel
Showing results for 
Search instead for 
Did you mean: 

UART Transmission - Why one MCU's UART GPIO pin state(Pull up) during the initialization impacting the Receiving/Transmitting or wake up capability of MCU2, connected over UART?

KK.4
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.

Observations:

  1. With default configuration as above, communication is not working as expected. By probing the AT master's LPUART TX line with an external UART convertor's RX, shows the data is actually transmitted by the LPUART. But, it is not seen/received/wakeup by the AT slave.
  2. Here is the interesting behavior observed. During the initialization of the AT master's LPUART(), keeping the LPUART TX line externally pulled up, makes the communication to work as expected. After the LPUART initialization, removal of external pull up has no effect on the communication.

Question: Why MCU1 LPUART GPIO pin state during the initialization impacting the Receiving/Transmitting or wake up capability of MCU2, connected over UART?

What am i missing? Please guide.

2 REPLIES 2

Debug the slave as usually. Observe the UART errors. Prolonged log.0 at Rx is BREAK, which in STM32 UARTs acts as a framing error - do you handle that error?

JW

KK.4
Associate II

Thanks for your insights. Unfortunately i don't have debug pins exposed in the custom board for slave.

I think i can rule out the BREAK error by the following observation, please correct me if otherwise.

Both the boards are power cycled at the same time (as they are connected to same battery source),After the power cycle I manually reset the slave first and wait for significant time till it finishes initialization to enter stop mode. And then i manually reset the Master(to eventually call UART_INIT while having the pin pulled up) works completely fine.

To be precise, the pull up state of the LPUART TX pin before and after the call to LPUART initialization does not have any effect. It only has effect during the call to MX_LPUART1_UART_Init().