Watchdog Timers

1. Operation

Each CPU core includes a dedicated watchdog timer (at 0xC000_0000 + N * 0x400), providing per-core timeout monitoring. Reset effects are described in Clocks and Resets. Base addresses and interrupt-related context for the WDT are summarized in Interrupts.

Timeouts are configurable to suit different workloads, and staged warnings (followed by reset) allow software intervention before hardware reset is triggered.

Watchdog monitoring can be disabled during debugging to prevent false triggers, supporting uninterrupted development and troubleshooting.

The watchdog interrupt is CTRL.wdogip0. Hardware sets it on every cycle the scaled count is at or above CMP, so it cannot be cleared while that holds. Feeding the watchdog resets the count but leaves wdogip0 set. The watchdog interrupt clear sequence is in the Programmer’s Guide.

1.1. Register Access

Each watchdog is locked out of reset, and a write to any register other than KEY locks it again. Software changes one register at a time:

  1. Write 0x51F15E to KEY. KEY reads 1 while the watchdog is unlocked.

  2. Write the target register. The watchdog locks again on this write, so the next write needs a new KEY write first.

A write acts only when its byte enables cover the register’s width, and a narrower write completes with an OKAY response without changing anything, so software cannot detect a dropped write from the response. Software uses 32-bit stores for every register except CTRL, which accepts byte writes. The Detailed Register Map below gives the width each register requires.

2. Memory Map and Register Reference

2.1. Memory Map

Register offsets are relative to the block base in the subsystem memory map. The detailed map below defines each register and its fields.

2.2. Detailed Register Map

Watchdog Timer Address Map

Watchdog timer configuration, counter, compare, and feed and key registers.

A write takes effect only if its byte enables cover all four bytes of COUNT, COUNT_HI, FEED or KEY, or bytes 0 and 1 of SCALED_COUNT or CMP; each CTRL byte is written on its own. Any other write returns OKAY and changes nothing, not even the lock.

Each effective write to a register other than KEY locks the watchdog, and changes no field if it was already locked. A 64-bit write at 0x18 writes FEED and KEY together and leaves the watchdog locked.

Register List:

AddressNameAccessDescription
0x0CTRLRWKEY reg must be written to before any other register in this addrmap can be written to, unlocking the WDT. After writing to another register, the WDT will be locked again, and KEY must be written to again to unlock it.
0x8COUNTRW-
0xCCOUNT_HIW-
0x10SCALED_COUNTRW-
0x18FEEDRW-
0x1CKEYRW-
0x20CMPRW-

Register Details:

CTRL

BitsFieldAccessResetDescription
31:29rsvd3R0x0Reserved
28wdogip0RW0x0Pending interrupt. Hardware sets this bit on every cycle the scaled count has reached the compare value.
To clear it, write KEY and then write 0 to this bit while the scaled count is below the compare value. Writing FEED does not clear it.
27:14rsvd2R0x0Reserved
13wdogcoreawakeRW0x0Enable WDT to only count when the core is not in reset
12wdogenalwaysRW0x0Enable WDT to always count. This has priority over wdogcoreawake
11:10rsvd1R0x0Reserved
9wdogzerocmpRW0x0Enable cycle counter to be reset to 0 when compare value has been reached
8wdogrstenRW0x0Enables a sticky reset signal to outputted to top level, can be used for a second stage wdt
7:4rsvd0R0x0Reserved
3:0wdogscaleRW0x0WDT counter scale value. Scales the current cycle count (time) by count / 2 ^ wdogscale value

COUNT

BitsFieldAccessResetDescription
31Reserved--Reserved
30:0wdogcountRW0x031 bit wdt counter registers. On write, the counter will be set to the written value, then continue counting up.
KEY reg must be written to before any other register in this addrmap can be written to, unlocking the WDT. After writing to another register, the WDT will be locked again, and KEY must be written to again to unlock it.

COUNT_HI

BitsFieldAccessResetDescription
31:0wdogcounthiW0x0Upper word of the counter. The counter is 31 bits wide and lies entirely in COUNT, so this register has no storage and reads 0. A write covering all four bytes leaves the counter unchanged but locks the WDT, so KEY must be written again before the next write.

SCALED_COUNT

BitsFieldAccessResetDescription
31:16Reserved--Reserved
15:0wdogsRW0x0Scaled value of wdt counter. (i.e. count >> wdogscale). Writing to this reg has no effect, but will lock the WDT (meaning KEY must be written to KEY reg to unlock it again).
KEY reg must be written to before any other register in this addrmap can be written to, unlocking the WDT. After writing to another register, the WDT will be locked again, and KEY must be written to again to unlock it.

FEED

BitsFieldAccessResetDescription
31:0wdogfeedRW0x0Feed register. Writing 0xD09F00D will reset the counter value back to 0. Feeding does not clear CTRL.wdogip0.
KEY reg must be written to before any other register in this addrmap can be written to, unlocking the WDT. After writing to another register, the WDT will be locked again, and KEY must be written to again to unlock it.

KEY

BitsFieldAccessResetDescription
31:0wdogkeyRW0x0Key register. Magic key (0x51F15E) must be written to this register before a write to any other register in this addrmap. Must be written every time. Reading this reg returns 1 if key has been written to it and it
is unlocked, 0 otherwise.

CMP

BitsFieldAccessResetDescription
31:16Reserved--Reserved
15:0wdogcmp0RW0x1000Compare register. Value that gets compared to wdogs.
KEY reg must be written to before any other register in this addrmap can be written to, unlocking the WDT. After writing to another register, the WDT will be locked again, and KEY must be written to again to unlock it.