Skip to content

Commit 3b794cb

Browse files
committed
Select TIMG function clock source
1 parent 20a1423 commit 3b794cb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

esp-hal/src/timer/timg.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,15 @@ impl TimerGroupInstance for TIMG0<'_> {
144144
}
145145

146146
fn configure_src_clk() {
147+
#[cfg(soc_has_clock_node_timg0_function_clock)]
148+
crate::soc::clocks::ClockTree::with(|clocks| {
149+
crate::soc::clocks::configure_timg0_function_clock(
150+
clocks,
151+
crate::soc::clocks::Timg0FunctionClockConfig::Pll40m,
152+
);
153+
crate::soc::clocks::request_timg0_function_clock(clocks);
154+
});
155+
147156
cfg_if::cfg_if! {
148157
if #[cfg(not(timergroup_default_clock_source_is_set))] {
149158
// Clock source is not configurable

0 commit comments

Comments
 (0)