core is sleeping. The counter increments by one each cycle only if any of the enabled conditions
are true. The
wdogen*
bits are reset on AON reset.
The 4-bit
wdogscale
field scales the watchdog counter value before feeding it to the compara-
tor. The value in
wdogscale
is the bit position within the
wdogcount
register of the start of a
16-bit
wdogs
field. A value of 0 in
wdogscale
indicates no scaling, and
wdogs
would then be
equal to the low 16 bits of
wdogcount
. The maximum value of 15 in
wdogscale
corresponds to
dividing the clock rate by
, so for an input clock of 32.768 kHz, the LSB of
wdogs
will incre-
ment once per second.
The value of
wdogs
is memory-mapped and can be read as a single 16-bit value over the AON
TileLink bus.
The
wdogzerocmp
bit, if set, causes the watchdog counter
wdogcount
to be automatically reset
to zero one cycle after the
wdogs
counter value matches or exceeds the compare value in
wdogcmp
. This feature can be used to implement periodic counter interrupts, where the period is
independent of interrupt service time.
The
wdogrsten
bit controls whether the comparator output can set the
wdogrst
bit and hence
cause a full reset.
The
wdogip0
interrupt pending bit can be read or written.
wdogcmp0: Comparator 0 (
wdogcmp0
)
Register Offset
0x20
Bits
Field Name
Attr.
Rst.
Description
[15:0]
wdogcmp0
RW
X
Comparator 0
[31:16]
Reserved
The
wdogcmp
compare register is a 16-bit value against which the current
wdogs
value is com-
pared every cycle. The output of the comparator is asserted whenever the value of
wdogs
is
greater than or equal to
wdogcmp
.
The
wdogkey
register has one bit of state. To prevent spurious reset of the WDT, all writes to
wdogcfg
,
wdogfeed
,
wdogcount
,
wdogcount
,
wdogcmp
and
wdogip0
must be preceded by an
unlock operation to the
wdogkey
register location, which sets
wdogkey
. The value
0x51F15E
Table 37:
wdogcmp0: Comparator 0
Chapter 13 Watchdog Timer (WDT)
FE310-G003 Manual
© SiFive, Inc.
Page 64
Содержание FE310-G003
Страница 1: ...SiFive FE310 G003 Manual v1p1 SiFive Inc ...