RTC regulator & voltage calibration fixes

This commit is contained in:
Chai Ji’e
2020-04-10 14:25:40 +08:00
committed by Wang Jia Lin
parent 2f0a57dece
commit dac17709ec
6 changed files with 102 additions and 1 deletions

View File

@@ -79,6 +79,11 @@ static const char *TAG = "clk";
void esp_clk_init(void)
{
rtc_config_t cfg = RTC_CONFIG_DEFAULT();
RESET_REASON rst_reas;
rst_reas = rtc_get_reset_reason(0);
if (rst_reas == POWERON_RESET) {
cfg.cali_ocode = 1;
}
rtc_init(cfg);
assert(rtc_clk_xtal_freq_get() == RTC_XTAL_FREQ_40M);