We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df0f47f commit 964b3e4Copy full SHA for 964b3e4
src/watchdog.rs
@@ -12,7 +12,7 @@ pub struct IndependentWatchdog {
12
}
13
14
const LSI_KHZ: u32 = 40;
15
-const MAX_PR: u8 = 4;
+const MAX_PR: u8 = 8;
16
const MAX_RL: u16 = 0xFFF;
17
const KR_ACCESS: u16 = 0x5555;
18
const KR_RELOAD: u16 = 0xAAAA;
@@ -69,6 +69,9 @@ impl IndependentWatchdog {
69
0b010 => 16,
70
0b011 => 32,
71
0b100 => 64,
72
+ 0b101 => 128,
73
+ 0b110 => 256,
74
+ 0b111 => 256,
75
_ => panic!("Invalid IWDG prescaler divider"),
76
};
77
(u32::from(rl) + 1) * divider / LSI_KHZ
0 commit comments