ulp: clear rtc int at initialization

Closes https://github.com/espressif/esp-idf/issues/6654
This commit is contained in:
Renz Bagaporo 2021-03-24 19:58:12 +08:00 committed by Marius Vikhammer
parent 98c20ce417
commit 0e904b3f7e
6 changed files with 16 additions and 0 deletions

View File

@ -80,4 +80,7 @@ __attribute__((weak)) void bootloader_clock_configure(void)
rtc_clk_32k_bootstrap(CONFIG_ESP_SYSTEM_RTC_EXT_XTAL_BOOTSTRAP_CYCLES);
}
#endif // CONFIG_ESP_SYSTEM_RTC_EXT_XTAL
REG_WRITE(RTC_CNTL_INT_ENA_REG, 0);
REG_WRITE(RTC_CNTL_INT_CLR_REG, UINT32_MAX);
}

View File

@ -79,6 +79,7 @@ void esp_brownout_init(void)
brownout_hal_config(&cfg);
#ifndef SOC_BROWNOUT_RESET_SUPPORTED
rtc_isr_register(rtc_brownout_isr_handler, NULL, RTC_CNTL_BROWN_OUT_INT_ENA_M);

View File

@ -96,6 +96,9 @@ void rtc_init(rtc_config_t cfg)
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD);
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_NOISO);
}
REG_WRITE(RTC_CNTL_INT_ENA_REG, 0);
REG_WRITE(RTC_CNTL_INT_CLR_REG, UINT32_MAX);
}
rtc_vddsdio_config_t rtc_vddsdio_get_config(void)

View File

@ -151,6 +151,9 @@ void rtc_init(rtc_config_t cfg)
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD);
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_NOISO);
}
REG_WRITE(RTC_CNTL_INT_ENA_REG, 0);
REG_WRITE(RTC_CNTL_INT_CLR_REG, UINT32_MAX);
}
rtc_vddsdio_config_t rtc_vddsdio_get_config(void)

View File

@ -159,6 +159,9 @@ void rtc_init(rtc_config_t cfg)
calibrate_ocode();
}
}
REG_WRITE(RTC_CNTL_INT_ENA_REG, 0);
REG_WRITE(RTC_CNTL_INT_CLR_REG, UINT32_MAX);
}
rtc_vddsdio_config_t rtc_vddsdio_get_config(void)

View File

@ -189,6 +189,9 @@ void rtc_init(rtc_config_t cfg)
}
rtc_clk_cpu_freq_set_config(&old_config);
}
REG_WRITE(RTC_CNTL_INT_ENA_REG, 0);
REG_WRITE(RTC_CNTL_INT_CLR_REG, UINT32_MAX);
}
rtc_vddsdio_config_t rtc_vddsdio_get_config(void)