File tree Expand file tree Collapse file tree 5 files changed +25
-9
lines changed Expand file tree Collapse file tree 5 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 11/*
2- * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
2+ * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
1616#include "esp_private/esp_pmu.h"
1717#include "soc/regi2c_dig_reg.h"
1818#include "regi2c_ctrl.h"
19+ #include "esp_private/ocode_init.h"
20+ #include "esp_rom_sys.h"
1921
2022static __attribute__((unused )) const char * TAG = "pmu_init" ;
2123
@@ -212,4 +214,10 @@ void pmu_init(void)
212214 pmu_lp_system_init_default (PMU_instance ());
213215
214216 pmu_power_domain_force_default (PMU_instance ());
217+
218+ #if !CONFIG_IDF_ENV_FPGA
219+ if (esp_rom_get_reset_reason (0 ) == RESET_REASON_CHIP_POWER_ON ) {
220+ esp_ocode_calib_init ();
221+ }
222+ #endif
215223}
Original file line number Diff line number Diff line change 1717#include "esp_private/esp_pmu.h"
1818#include "soc/regi2c_dig_reg.h"
1919#include "regi2c_ctrl.h"
20+ #include "esp_private/ocode_init.h"
21+ #include "esp_rom_sys.h"
2022
2123static __attribute__((unused )) const char * TAG = "pmu_init" ;
2224
@@ -218,4 +220,10 @@ void pmu_init(void)
218220 pmu_lp_system_init_default (PMU_instance ());
219221
220222 pmu_power_domain_force_default (PMU_instance ());
223+
224+ #if !CONFIG_IDF_ENV_FPGA
225+ if (esp_rom_get_reset_reason (0 ) == RESET_REASON_CHIP_POWER_ON ) {
226+ esp_ocode_calib_init ();
227+ }
228+ #endif
221229}
Original file line number Diff line number Diff line change 1717#include "esp_private/esp_pmu.h"
1818#include "soc/regi2c_dig_reg.h"
1919#include "regi2c_ctrl.h"
20+ #include "esp_private/ocode_init.h"
21+ #include "esp_rom_sys.h"
2022
2123static __attribute__((unused )) const char * TAG = "pmu_init" ;
2224
@@ -213,4 +215,10 @@ void pmu_init(void)
213215 pmu_lp_system_init_default (PMU_instance ());
214216
215217 pmu_power_domain_force_default (PMU_instance ());
218+
219+ #if !CONFIG_IDF_ENV_FPGA
220+ if (esp_rom_get_reset_reason (0 ) == RESET_REASON_CHIP_POWER_ON ) {
221+ esp_ocode_calib_init ();
222+ }
223+ #endif
216224}
Original file line number Diff line number Diff line change 3232#include "esp_private/periph_ctrl.h"
3333#include "esp_private/esp_clk.h"
3434#include "esp_private/esp_pmu.h"
35- #include "esp_private/ocode_init.h"
3635#include "esp_rom_uart.h"
3736#include "esp_rom_sys.h"
3837
@@ -52,9 +51,6 @@ void esp_rtc_init(void)
5251{
5352#if !CONFIG_IDF_ENV_FPGA
5453 pmu_init ();
55- if (esp_rom_get_reset_reason (0 ) == RESET_REASON_CHIP_POWER_ON ) {
56- esp_ocode_calib_init ();
57- }
5854#endif
5955}
6056
Original file line number Diff line number Diff line change 4545#include "esp_private/periph_ctrl.h"
4646#include "esp_private/esp_clk.h"
4747#include "esp_private/esp_pmu.h"
48- #include "esp_private/ocode_init.h"
4948#include "esp_rom_uart.h"
5049#include "esp_rom_sys.h"
5150
@@ -72,9 +71,6 @@ void esp_rtc_init(void)
7271
7372#if !CONFIG_IDF_ENV_FPGA
7473 pmu_init ();
75- if (esp_rom_get_reset_reason (0 ) == RESET_REASON_CHIP_POWER_ON ) {
76- esp_ocode_calib_init ();
77- }
7874#endif
7975}
8076
You can’t perform that action at this time.
0 commit comments