Page 1 of 1

external 32KHz crystal calibration time

Posted: Tue Oct 29, 2019 12:56 am
by Seungwhan
Hi,

So when you enable external 32KHz crystal, it will perform calibration during booting.
https://github.com/espressif/esp-idf/bl ... clk.c#L186

I modified rtc_clk_cal_internal()(which is a function that actually does the calibration) to measure how long does the calibration take.
And when SLOW_CLK_CAL_CYCLES was set to 3276, it was about ~100ms.

But when we run our app(both bootloader and app) it takes about 300ms ~ 500ms.

Hardware is ok.
Because when we run esp-idf's example app, everything is normal.

What could possibly affect the calibration time?

One more thing to note is that if I turn off CONFIG_TASK_WDT menuconfig option,
calibration time in our app comes back to normal.
But turning that option on or off in the example app didn't affect the calibration time.

Any comment would be appreciated.
Thank you.