File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,9 @@ static uint32_t calculateApb(rtc_cpu_freq_config_t *conf) {
175175#endif
176176}
177177
178+ #if defined(CONFIG_IDF_TARGET_ESP32 ) && !defined(LACT_MODULE ) && !defined(LACT_TICKS_PER_US )
178179void esp_timer_impl_update_apb_freq (uint32_t apb_ticks_per_us ); //private in IDF
180+ #endif
179181
180182bool setCpuFrequencyMhz (uint32_t cpu_freq_mhz ) {
181183 rtc_cpu_freq_config_t conf , cconf ;
@@ -248,8 +250,12 @@ bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz) {
248250 //Update APB Freq REG
249251 rtc_clk_apb_freq_update (apb );
250252 //Update esp_timer divisor
253+ #if CONFIG_IDF_TARGET_ESP32
251254#if defined(LACT_MODULE ) && defined(LACT_TICKS_PER_US )
252255 timer_ll_set_lact_clock_prescale (TIMER_LL_GET_HW (LACT_MODULE ), apb / MHZ / LACT_TICKS_PER_US );
256+ #else
257+ esp_timer_impl_update_apb_freq (apb / MHZ );
258+ #endif
253259#endif
254260 }
255261#endif
You can’t perform that action at this time.
0 commit comments