#esp32 UART question
1 messages · Page 1 of 1 (latest)
<@&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>.
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:
- ESP-IDF UART Sleep Wakeup API
- Espressif Forum: Using UART as wakeup source
- ESP32 Technical Reference Manual (UART section) (See UART wakeup capabilities)
the problem im having is that the esp32 doesnt get woken up when I send a UART message, without sleep it works
and you have tried esp_sleep_enable_uart_wakeup
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.
yess. By dual use i mean that I use it as communication between my two microcontrollers and as a wakeup source at the same it