#esp32 UART question

1 messages · Page 1 of 1 (latest)

urban olive
#

does anyone know if its possible to use esp32 UART1 to transmit/receive data from a different microcontroller and use that same UART1 as a wakeup source from light sleep? I couldnt find information about that dual use online

blazing capeBOT
#

<@&987246683568103514> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
Does anyone know if its possible to use esp32 UART1 to transmit/receive data from a different microcontroller and use that same UART1 as a wakeup source from light sleep? I couldnt find information about that dual use online

On the ESP32, UART1 can be used for both communication with another microcontroller and as a wakeup source from light sleep, but there are some caveats.

The ESP-IDF supports UART wakeup through the UART peripheral configured as a wakeup source. The wakeup triggers when the UART line detects activity (e.g., start bit at the RX pin). Typically, only the UART RX pin activity triggers the wakeup—not the TX line.

The key points:

  • You must configure UART1 with the ESP-IDF esp_sleep_enable_uart_wakeup() function.
  • The UART should be set up with RS485 or normal mode depending on your communication.
  • The light sleep mode allows UART wakeup—deep sleep is different and usually requires RTC GPIO or UART from UART0 only.
  • UART1 wakeup depends on appropriate hardware wiring and debouncing of the line.

Because UART1 is not the default debug console, it is commonly used for external devices and wakeup.

For more technical details and sample code, check these reliable sources.


Useful links:

urban olive
#

the problem im having is that the esp32 doesnt get woken up when I send a UART message, without sleep it works

shrewd grove
#

what do you mean by dual use?
it is one use.
just that you configure the esp32 to keep a part of it awake while the rest is sleeping.

urban olive
shrewd grove
#

well maybe your esp32 do not support it?

#

that would be the first thing to check

#

or maybe only for some pins