File tree 1 file changed +6
-0
lines changed 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) {
175
175
#endif
176
176
}
177
177
178
+ #if defined(CONFIG_IDF_TARGET_ESP32 ) && !defined(LACT_MODULE ) && !defined(LACT_TICKS_PER_US )
178
179
void esp_timer_impl_update_apb_freq (uint32_t apb_ticks_per_us ); //private in IDF
180
+ #endif
179
181
180
182
bool setCpuFrequencyMhz (uint32_t cpu_freq_mhz ) {
181
183
rtc_cpu_freq_config_t conf , cconf ;
@@ -248,8 +250,12 @@ bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz) {
248
250
//Update APB Freq REG
249
251
rtc_clk_apb_freq_update (apb );
250
252
//Update esp_timer divisor
253
+ #if CONFIG_IDF_TARGET_ESP32
251
254
#if defined(LACT_MODULE ) && defined(LACT_TICKS_PER_US )
252
255
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
253
259
#endif
254
260
}
255
261
#endif
You can’t perform that action at this time.
0 commit comments