tinyboot_ch32_hal/iwdg.rs
1/// Feed the independent watchdog timer.
2///
3/// Writes the reload key (0xAAAA) to IWDG_CTLR. Safe to call even if
4/// the watchdog is not enabled — the write is simply ignored.
5pub fn feed() {
6 const IWDG_CTLR: u32 = 0x4000_3000;
7 unsafe { core::ptr::write_volatile(IWDG_CTLR as *mut u32, 0xAAAA) };
8}