pub struct WindowWatchdog<'d, T: WwdgInstance> { /* private fields */ }Expand description
Window watchdog (WWDG) driver.
Once activated via WindowWatchdog::new, the WWDG cannot be stopped
without a system reset.
The counter counts from T down to 0x3F (63), triggering a reset when it
reaches 0x3F. Petting the watchdog while the counter is still above the
window register W (the closed window) also causes an immediate reset.
T_initial ──count down──▶ W ──count down──▶ 0x40 ──▶ 0x3F (RESET)
|◄──── closed window ────►|◄──── open window ────►|Implementations§
Source§impl<'d, T: WwdgInstance> WindowWatchdog<'d, T>
impl<'d, T: WwdgInstance> WindowWatchdog<'d, T>
Sourcepub fn new(_instance: Peri<'d, T>, timeout_us: u32, window_us: u32) -> Self
pub fn new(_instance: Peri<'d, T>, timeout_us: u32, window_us: u32) -> Self
Creates and immediately starts the window watchdog.
timeout_us: total watchdog period in microseconds (counter-to-reset time).window_us: closed-window duration in microseconds. During this initial portion of the period, petting the watchdog causes a reset. Pass0to disable the window restriction (allow petting at any time within the period). Must be strictly less thantimeout_us.
Auto Trait Implementations§
impl<'d, T> Freeze for WindowWatchdog<'d, T>
impl<'d, T> RefUnwindSafe for WindowWatchdog<'d, T>where
T: RefUnwindSafe,
impl<'d, T> Send for WindowWatchdog<'d, T>where
T: Send,
impl<'d, T> Sync for WindowWatchdog<'d, T>where
T: Sync,
impl<'d, T> Unpin for WindowWatchdog<'d, T>
impl<'d, T> !UnwindSafe for WindowWatchdog<'d, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more