Datasheet

ADuC7128/ADuC7129
Rev. 0 | Page 80 of 92
Table 115. T3CON MMR Bit Designations
Bit Value Description
16:9 These bits are reserved and should be written as 0s by user code.
8 Count Up/Down Enable.
Set by user code to configure Timer3 to count up.
Cleared by user code to configure Timer3 to count down.
7 Timer3 Enable.
Set by user code to enable Timer3.
Cleared by user code to disable Timer3.
6 Timer3 Operating Mode.
Set by user code to configure Timer3 to operate in periodic mode.
Cleared by user to configure Timer3 to operate in free-running mode.
5 Watchdog Timer Mode Enable.
Set by user code to enable watchdog mode.
Cleared by user code to disable watchdog mode.
4 Secure Clear Bit.
Set by user to use the secure clear option.
Cleared by user to disable the secure clear option by default.
3:2 Timer3 Clock (32.768 kHz) Prescaler.
00 Source Clock/1 (Default).
01 Reserved.
10 Reserved.
11 Reserved.
1 Watchdog Timer IRQ Enable.
Set by user code to produce an IRQ instead of a reset when the watchdog reaches 0.
Cleared by user code to disable the IRQ option.
0 PD_OFF.
Set by user code to stop Timer3 when the peripherals are powered down via Bit 4 in the POWCON MMR.
Cleared by user code to enable Timer3 when the peripherals are powered down via Bit 4 in the POWCON MMR.
Secure Clear Bit (Watchdog Mode Only)
The secure clear bit is provided for a higher level of protection.
When set, a specific sequential value must be written to T3ICLR
to avoid a watchdog reset. The value is a sequence generated by
the 8-bit linear feedback shift register (LFSR) polynomial equal
to X8 + X6 + X5 + X + 1, as shown in
Figure 59.
CLOCK
QD
4
QD
5
QD
3
QD
7
QD
6
QD
2
QD
1
QD
0
06020-054
Figure 59. 8-Bit LFSR
The initial value or seed is written to T3ICLR before entering
watchdog mode. After entering watchdog mode, a write to
T3ICLR must match this expected value. If it matches, the LFSR
is advanced to the next state when the counter reload happens.
If it fails to match the expected state, reset is immediately
generated, even if the count has not yet expired.
The value 0x00 should not be used as an initial seed due to the
properties of the polynomial. The value 0x00 is always guaran-
teed to force an immediate reset. The value of the LFSR cannot
be read; it must be tracked/generated in software.
The following is an example of a sequence:
1.
Enter initial seed, 0 xAA, in T3ICLR before starting
Timer3 in watchdog mode.
2.
Enter 0 xAA in T3ICLR; Timer3 is reloaded.
3.
Enter 0x37 in T3ICLR; Timer3 is reloaded.
4.
Enter 0x6E in T3ICLR; Timer3 is reloaded.
5. Enter 0x66. 0xDC was expected; the watchdog resets
the chip.