esp32s3 ulp riscv "adjustable" RC_FAST_CLK

User avatar
pullup42
Posts: 2
Joined: Thu May 22, 2025 4:09 pm

esp32s3 ulp riscv "adjustable" RC_FAST_CLK

Postby pullup42 » Thu May 22, 2025 4:15 pm

Hi,

The official TRM keeps saying that RC_FAST_CLK (17.5 Mhz by default) is somehow adjustable. Now this is really not clear, what is adjustable there and how?

TRM Chapter 7.2.3:
"RC_FAST_CLK (17.5 MHz by default): internal fast RC oscillator clock with adjustable frequency"

It would be nice if this could be further clarified, if there are any "trimming" registers or any other way, other than measuring its period against more stable clock, to adjust the frequency of this clock, even if just slightly.

Thanks

MicroController
Posts: 2672
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: esp32s3 ulp riscv "adjustable" RC_FAST_CLK

Postby MicroController » Sat May 24, 2025 8:01 am

There actually appears to be a trimming register: The RTC_CNTL_CK8M_DFREQ field in RTC_CNTL_CLK_CONF_REG.

It's set by the bootloader via rtc_clk_init() (from rtc_clk_config_t::clk_8m_dfreq, which says "higher value leads to higher frequency").

User avatar
pullup42
Posts: 2
Joined: Thu May 22, 2025 4:09 pm

Re: esp32s3 ulp riscv "adjustable" RC_FAST_CLK

Postby pullup42 » Sat May 24, 2025 9:19 am

Ah, choosing register and field names has never been your strongest suit, Espressif, right..

Thanks! This helps, I just need to "boost" it slightly, temporarily to meet the timing constraints, then put back to default.

MicroController
Posts: 2672
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: esp32s3 ulp riscv "adjustable" RC_FAST_CLK

Postby MicroController » Sun May 25, 2025 10:58 pm

Had to give it a try...
I seem to be able to 'pull' the RC_FAST_CLK all the way from ~15 to ~23MHz. Impressive!
ESP32-S3 RC FAST trim small.png
ESP32-S3 RC FAST trim small.png (27.14 KiB) Viewed 91 times
(~23.6kHz/DFREQ at the low end, ~50.3kHz/DFREQ at the high end)

Who is online

Users browsing this forum: Qwantbot and 4 guests