Expand description
The chip’s two watchdogs.
Both reset the chip unless fed in time, and neither can be stopped once started. What separates them is what they can catch:
Fwdgtruns off IRC40K, independent of the system clock, and spans milliseconds to 26 seconds. It notices that code stopped feeding it — nothing more.Wwdgtruns offPCLK1and spans tens of milliseconds. Feeding it too early is a fault as well, so it also notices code that kept running but lost its pace, and it can raise an interrupt one tick before the reset.
A watchdog that has to survive a broken clock tree is Fwdgt; one that
checks the rhythm of a tight control loop is Wwdgt.
ⓘ
let mut watchdog = dp.fwdgt.constrain(&mut rcu).start_timeout(2.secs());
loop {
watchdog.feed();
}Structs§
- Fwdgt
- The watchdog before it is started, the only state its period can be set in.
- Fwdgt
Running - The watchdog once it is counting down.
- Wwdgt
- The watchdog before it is started, the only state it can be configured in.
- Wwdgt
Running - The watchdog once it is counting down.
Enums§
- Fwdgt
Psc - Divider on IRC40K ahead of the counter (Table 12-1).
- Wwdgt
Psc - Prescaler on the counter clock, named after the
PSCfield it writes.