must be written to the
wdogkey
register address to set the state bit before any write access to
any other watchdog register. The state bit is reset at AON reset, and after any write to a watch-
dog register.
Watchdog registers may be read without setting
wdogkey
.
After a successful key unlock, the watchdog can be fed using a write of the value
0xD09F00D
to
the
wdogfeed
address, which will reset the
wdogcount
register to zero. The full watchdog feed
sequence is shown in Listing 2.
Listing 2:
Sequence to reinitialize watchdog.
li t0, 0x51F15E # Obtain key.
sw t0, wdogkey # Unlock kennel.
li t0, 0xD09F00D # Get some food.
sw t0, wdogfeed # Feed the watchdog.
Note there is no state associated with the
wdogfeed
address. Reads of this address return 0.
The WDT provides watchdog intervals of up to over 18 hours ( 65,535 seconds).
If the watchdog is not fed before the
wdogcount
register exceeds the compare register zero
while the WDT is enabled, a reset pulse is sent to the reset circuitry, and the chip will go through
a complete power-on sequence.
The WDT will be initalized after a full reset, with the
wdogrsten
and
wdogen*
bits cleared.
The WDT can be configured to provide periodic counter interrupts by disabling watchdog resets
(
wdogrsten
=0) and enabling auto-zeroing of the count register when the comparator fires
(
wdogzerocmp
=1).
The sticky single-bit
wdogip0
register captures the comparator output and holds it to provide an
interrupt pending signal. The
wdogip
register resides in the
wdogcfg
register, and can be read
and written over TileLink to clear down the interrupt.
Chapter 13 Watchdog Timer (WDT)
FE310-G003 Manual
© SiFive, Inc.
Page 65
Содержание FE310-G003
Страница 1: ...SiFive FE310 G003 Manual v1p1 SiFive Inc ...