Skip to content

Commit 75fa3e0

Browse files
committed
Keep WDT off
1 parent c8e8835 commit 75fa3e0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

esp-hal/src/timer/timg.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ where
201201
clock.request_function_clock(clocks);
202202
});
203203

204-
Self {
204+
let mut this = Self {
205205
_timer_group: PhantomData,
206206
timer0: Timer {
207207
timer: TimerId::Timer0,
@@ -217,7 +217,12 @@ where
217217
_lifetime: PhantomData,
218218
},
219219
wdt: Wdt::new(),
220-
}
220+
};
221+
222+
// On TIMG0, the watchdog timer is enabled upon peripheral reset.
223+
this.wdt.disable();
224+
225+
this
221226
}
222227
}
223228

0 commit comments

Comments
 (0)