fix(mpll): improved mpll calibration flow on esp32s31

Signed-off-by: Armando (Dou Yiwen) <douyiwen@espressif.com>
This commit is contained in:
Armando (Dou Yiwen)
2026-08-24 09:34:36 +08:00
parent a9de6a4f30
commit 9726078b55
4 changed files with 68 additions and 26 deletions
@@ -657,13 +657,8 @@ void rtc_clk_mpll_configure(uint32_t xtal_freq, uint32_t mpll_freq, bool thread_
} else {
ANALOG_CLOCK_ENABLE();
}
/* MPLL calibration start */
clk_ll_mpll_calibration_start();
clk_ll_mpll_set_config(mpll_freq, xtal_freq);
/* wait calibration done */
while(!clk_ll_mpll_calibration_is_done());
/* MPLL calibration stop */
clk_ll_mpll_calibration_stop();
if (thread_safe) {
_regi2c_ctrl_ll_master_enable_clock(false);