Closed oseiler2 closed 1 month ago
Maybe related to this https://github.com/espressif/arduino-esp32/pull/8097/files
Issue confirmed.
This issue only happens with IDF esp_light_sleep_start();
.
The example from https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/Serial/Serial_All_CPU_Freqs/Serial_All_CPU_Freqs.ino that changes the CPU frequency from 160MHz to 10MHz works fine.
ESP32-C3 works correctly after esp_light_sleep_start();
.
This seems to be an exclusive issue for the C6 /H2+ esp_light_sleep_start();
.
Thanks for the quick fix!
Board
esp32-c6-devkitc-1
Device Description
ESP32-C6-DevKitC-1 V1.2
Also occurs on another custom ESP32-C6 board (ESP32-C6-WROOM-1-N8CT-ND)
Hardware Configuration
Nothing else connected.
Version
v3.0.3
IDE Name
PlatformIO
Operating System
Win10
Flash frequency
80
PSRAM enabled
no
Upload speed
460800
Description
When waking up from light sleep, the UART0 (serial) baud rate changes from configured 115200 to about 105000 if the CPU clock is running slower than 80MHz (eg 40 MHz). No issues at 80 or 160MHz CPU clk.
Re-initialising the serial after wake up does not fix the issue.
When I change the baud rate after wake up to 126390 (~115200/105000*115200), it sends at about the desired 115200 baud (confirmed with scope).
I've had a look at https://github.com/espressif/arduino-esp32/issues/8122#issuecomment-1524381223 When I edit
esp32-hal-uart.c
and changeUART_SCLK_DEFAULT
toSOC_MOD_CLK_XTAL
the problem goes away, and the UART remains at 115200 after light sleep.Sketch attached: ESP32-C6 light sleep minimal.zip
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide