Copyright
c
2016, SiFive Inc. All rights reserved.
27
R
eserve
d
31
16
wdogcmp[15:0]
15
0
Figure 8.3: Watchdog compare register
wdogcmp
li t0, 0x51F15E
# Obtain key.
sw t0, wdogkey
# Unlock kennel.
li t0, 0xD09F00D # Get some food.
sw t0, wdogfeed
# Feed the watchdog.
Figure 8.4: Sequence to reinitialize watchdog.
Watchdog Compare Register (
wdogcmp
)
The compare register is a 16-bit value against which the current
wdogs
value is compared every
cycle. The output of the comparator is asserted whenever the value of
wdogs
is greater than or
equal to
wdogcmp
.
Watchdog Key Register (
wdogkey
)
The
wdogkey
register has one bit of state. To prevent spurious reset of the WDT, all writes to
wdogcfg
,
wdogfeed
,
wdogcount
,
wdogs
,
wdogcmp
and
wdogcmpip
must be preceded by an unlock
operation to the
wdogkey
register location, which sets
wdogkey
. The value
0x51F15E
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 watchdog register.
Watchdog registers may be read without setting
wdogkey
.
Watchdog Feed Address (
wdogfeed
)
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 Figure 8.4.
Note there is no state associated with the
wdogfeed
address. Reads of this address return 0.
Watchdog Configuration
The WDT provides watchdog intervals of up to over 18 hours (
≈
65,535 seconds).
Watchdog Resets
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 mode bit cleared.
Summary of Contents for E300
Page 1: ...SiFive E300 Platform Reference Manual Version 1 0 1 c SiFive Inc ...
Page 2: ...2 SiFive E300 Platform Reference Manual Version 1 0 1 ...
Page 4: ...ii SiFive E300 Platform Reference Manual Version 1 0 1 ...
Page 12: ...4 SiFive E300 Platform Reference Manual Version 1 0 1 ...
Page 14: ...6 SiFive E300 Platform Reference Manual Version 1 0 1 ...
Page 22: ...14 SiFive E300 Platform Reference Manual Version 1 0 1 ...
Page 32: ...24 SiFive E300 Platform Reference Manual Version 1 0 1 ...
Page 40: ...32 SiFive E300 Platform Reference Manual Version 1 0 1 ...
Page 56: ...48 SiFive E300 Platform Reference Manual Version 1 0 1 ...
Page 60: ...52 SiFive E300 Platform Reference Manual Version 1 0 1 ...