Skip to content

Commit c8e8835

Browse files
committed
Enable timg0 for clock calibration
1 parent deffffb commit c8e8835

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

esp-hal/src/clock/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ impl Clocks {
279279
) -> (u32, Rate) {
280280
use esp_rom_sys::rom::ets_delay_us;
281281

282+
use crate::system::{Peripheral, PeripheralGuard};
283+
let _guard = PeripheralGuard::new(Peripheral::Timg0);
284+
282285
#[cfg(timergroup_rc_fast_calibration_divider)]
283286
let calibration_divider = if rtc_clock == TimgCalibrationClockConfig::RcFastDivClk
284287
&& crate::soc::chip_revision_above(property!(

0 commit comments

Comments
 (0)