/hal_espressif-3.6.0/components/esp_hw_support/port/esp32s2/ |
D | rtc_time.c | 36 static uint32_t rtc_clk_cal_internal_oneoff(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_internal_oneoff() argument 54 REG_SET_FIELD(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_MAX, slowclk_cycles); in rtc_clk_cal_internal_oneoff() 60 …CALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_X32K_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal_oneoff() 63 …LICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_8MD256_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal_oneoff() 66 …CCALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_90K_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal_oneoff() 69 uint32_t us_time_estimate = (uint32_t) (((uint64_t) slowclk_cycles) * 1000000 / expected_freq); in rtc_clk_cal_internal_oneoff() 101 static uint32_t rtc_clk_cal_internal_cycling(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_internal_cycling() argument 111 REG_SET_FIELD(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_MAX, slowclk_cycles); in rtc_clk_cal_internal_cycling() 113 cali_slowclk_cycles = slowclk_cycles; in rtc_clk_cal_internal_cycling() 129 static uint32_t rtc_clk_xtal_to_slowclk(uint64_t xtal_cycles, uint32_t slowclk_cycles) in rtc_clk_xtal_to_slowclk() argument [all …]
|
/hal_espressif-3.6.0/components/esp_hw_support/port/esp32c3/ |
D | rtc_time.c | 33 uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_internal() argument 77 REG_SET_FIELD(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_MAX, slowclk_cycles); in rtc_clk_cal_internal() 83 …CALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_X32K_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal() 86 …LICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_8MD256_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal() 89 …CALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_150K_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal() 92 uint32_t us_time_estimate = (uint32_t) (((uint64_t) slowclk_cycles) * MHZ / expected_freq); in rtc_clk_cal_internal() 121 uint32_t rtc_clk_cal_ratio(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_ratio() argument 123 uint64_t xtal_cycles = rtc_clk_cal_internal(cal_clk, slowclk_cycles); in rtc_clk_cal_ratio() 124 uint64_t ratio_64 = ((xtal_cycles << RTC_CLK_CAL_FRACT)) / slowclk_cycles; in rtc_clk_cal_ratio() 129 uint32_t rtc_clk_cal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal() argument [all …]
|
/hal_espressif-3.6.0/components/esp_hw_support/port/esp32h2/ |
D | rtc_time.c | 32 uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_internal() argument 73 REG_SET_FIELD(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_MAX, slowclk_cycles); in rtc_clk_cal_internal() 79 …CALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_X32K_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal() 82 …ALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_RC32K_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal() 85 …CALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_150K_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal() 88 uint32_t us_time_estimate = (uint32_t) (((uint64_t) slowclk_cycles) * MHZ / expected_freq); in rtc_clk_cal_internal() 113 uint32_t rtc_clk_cal_ratio(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_ratio() argument 115 uint64_t xtal_cycles = rtc_clk_cal_internal(cal_clk, slowclk_cycles); in rtc_clk_cal_ratio() 116 uint64_t ratio_64 = ((xtal_cycles << RTC_CLK_CAL_FRACT)) / slowclk_cycles; in rtc_clk_cal_ratio() 121 uint32_t rtc_clk_cal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal() argument [all …]
|
/hal_espressif-3.6.0/components/esp_hw_support/port/esp32s3/ |
D | rtc_time.c | 36 uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_internal() argument 79 REG_SET_FIELD(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_MAX, slowclk_cycles); in rtc_clk_cal_internal() 85 …CALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_X32K_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal() 88 …LICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_8MD256_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal() 91 …CALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, RTC_SLOW_CLK_150K_CAL_TIMEOUT_THRES(slowclk_cycles)); in rtc_clk_cal_internal() 94 uint32_t us_time_estimate = (uint32_t) (((uint64_t) slowclk_cycles) * 1000000 / expected_freq); in rtc_clk_cal_internal() 127 uint32_t rtc_clk_cal_ratio(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_ratio() argument 129 uint64_t xtal_cycles = rtc_clk_cal_internal(cal_clk, slowclk_cycles); in rtc_clk_cal_ratio() 130 uint64_t ratio_64 = ((xtal_cycles << RTC_CLK_CAL_FRACT)) / slowclk_cycles; in rtc_clk_cal_ratio() 135 uint32_t rtc_clk_cal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal() argument [all …]
|
/hal_espressif-3.6.0/components/esp_hw_support/port/esp32/ |
D | rtc_time.c | 38 static uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_internal() argument 40 assert(slowclk_cycles < 32767); in rtc_clk_cal_internal() 53 REG_SET_FIELD(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_MAX, slowclk_cycles); in rtc_clk_cal_internal() 66 uint32_t us_time_estimate = (uint32_t) (((uint64_t) slowclk_cycles) * 1000000 / expected_freq); in rtc_clk_cal_internal() 111 uint32_t rtc_clk_cal_ratio(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal_ratio() argument 113 uint64_t xtal_cycles = rtc_clk_cal_internal(cal_clk, slowclk_cycles); in rtc_clk_cal_ratio() 114 uint64_t ratio_64 = ((xtal_cycles << RTC_CLK_CAL_FRACT)) / slowclk_cycles; in rtc_clk_cal_ratio() 119 uint32_t rtc_clk_cal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) in rtc_clk_cal() argument 122 uint64_t xtal_cycles = rtc_clk_cal_internal(cal_clk, slowclk_cycles); in rtc_clk_cal() 123 uint64_t divider = ((uint64_t)xtal_freq) * slowclk_cycles; in rtc_clk_cal()
|
/hal_espressif-3.6.0/components/soc/esp32s2/include/soc/ |
D | rtc.h | 535 uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles, uint32_t cal_mode); 897 uint32_t rtc_clk_cal_cycling(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles);
|
/hal_espressif-3.6.0/components/soc/esp32c3/include/soc/ |
D | rtc.h | 503 uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles);
|
/hal_espressif-3.6.0/components/soc/esp32s3/include/soc/ |
D | rtc.h | 532 uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles);
|
/hal_espressif-3.6.0/components/soc/esp32h2/include/soc/ |
D | rtc.h | 519 uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles);
|