Is it possible to keep UART powered while in light-sleep?
Posted: Wed Jan 22, 2025 1:42 pm
I am using an ESP32-S3 with two UART connected peripherals.
To reduce power drain, I am using DFS and I want to implement auto light sleep. But when the chip enters light sleep, it looks like the UART stops working (either power is removed, clock is removed or both, I don't know). But I need the UART to keep working in light sleep. Using UART wake-up does not help because I cannot afford losing the initial bytes.
Can UART be kept powered and working while in light sleep mode? How?
Reading the datasheet, I cannot get clear information about if this is possible. According to this diagram, UART is in the digital power domain: And according to this diagram, the Digital domain power (that presumably has the UART inside) is controlled by the xpd_dg_wrap signal (that also according to datasheet is the same as xpd_dig_reg, governed by RTC_CNTL_DG_WRAP_PD_EN): My understanding is that the Digital System Voltage Regulator should be working, since I configured in menuconfig the CPU power to be maintained while in light-sleep (CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=n). Is this right? I have also configured GPIOs to keep working in light sleep (CONFIG_PM_SLP_DISABLE_GPIO=n).
If my assumption above is right, the only thing preventing the UART to work could be missing clock. I have tried configuring the UART to use UART_SCLK_RTC and UART_SCLK_XTAL without success.
Am I doing anything wrong? Is keeping the UART working in light-sleep even possible at all?
To reduce power drain, I am using DFS and I want to implement auto light sleep. But when the chip enters light sleep, it looks like the UART stops working (either power is removed, clock is removed or both, I don't know). But I need the UART to keep working in light sleep. Using UART wake-up does not help because I cannot afford losing the initial bytes.
Can UART be kept powered and working while in light sleep mode? How?
Reading the datasheet, I cannot get clear information about if this is possible. According to this diagram, UART is in the digital power domain: And according to this diagram, the Digital domain power (that presumably has the UART inside) is controlled by the xpd_dg_wrap signal (that also according to datasheet is the same as xpd_dig_reg, governed by RTC_CNTL_DG_WRAP_PD_EN): My understanding is that the Digital System Voltage Regulator should be working, since I configured in menuconfig the CPU power to be maintained while in light-sleep (CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=n). Is this right? I have also configured GPIOs to keep working in light sleep (CONFIG_PM_SLP_DISABLE_GPIO=n).
If my assumption above is right, the only thing preventing the UART to work could be missing clock. I have tried configuring the UART to use UART_SCLK_RTC and UART_SCLK_XTAL without success.
Am I doing anything wrong? Is keeping the UART working in light-sleep even possible at all?