Page 1 of 1

ESP32-S3 external 32.768 KHz crystal not selected after waking up from deep sleep

Posted: Sat Aug 16, 2025 3:50 am
by sqsqsq
Hi All,

I have a similar setup as described here viewtopic.php?p=130554#p130554 where I am selecting the external crystal as RTC slow clock source before going to deep sleep.

I confirm through

Code: Select all

rtc_clk_32k_enabled()
and

Code: Select all

rtc_clk_slow_freq_get
that the crystal is running before going to deep sleep. But when I wake up from deep sleep and print the slow clock source, it says it is using the Internal 150KHZ.

Is this expected behavior? Or was my RTC clock source never switched to the external crystal in the first place? It seems odd to default back to 150KHZ every time after waking from deep sleep.

Thank you and appreciate any guidance here :)

Re: ESP32-S3 external 32.768 KHz crystal not selected after waking up from deep sleep

Posted: Sat Aug 16, 2025 8:46 am
by lbernstone
I didn't dig through the bootloader code, but I'm going to guess that the CONFIG_ESP32S3_RTC_CLK_SRC_INT_RC in sdkconfig means that it gets set on every "boot", including wakeup from sleep. I think you would need to compile the sdk with CONFIG_ESP32S3_RTC_CLK_SRC_EXT_CRYS set for this to work. You can do this with lib-builder or compiling ESP-IDF with arduino as a component.

Re: ESP32-S3 external 32.768 KHz crystal not selected after waking up from deep sleep

Posted: Sun Aug 17, 2025 10:44 pm
by sqsqsq
Thank you @lbernstone !! After setting the config, it now stays on the external 32khz crystal after deep sleep :D