Datasheet
ADuC7128/ADuC7129
Rev. 0 | Page 77 of 92
TIMER2—WAKE-UP TIMER
TIMER2IRQ
32-BIT
LOAD
32-BIT
UP/DOWN
COUNTER
TIMER2
VALUE
PRESCALER
1, 16, 256,
OR 32768
EXTERNAL 32kHz
OSCILLATOR
INTERNAL 32kHz
OSCILLATOR
CORE CLOCK
06020-052
Figure 57. Timer2 Block Diagram
Timer2 is a 32-bit wake-up timer, count down or count up, with
a programmable prescaler. The prescaler is clocked directly from
one of four clock sources, namely, the core clock (default selection),
the internal 32.768 kHz oscillator, the external 32.768 kHz watch
crystal, or the core clock. The selected clock source can be
scaled by a factor of 1, 16, 256, or 32768. The wake-up timer
continues to run when the core clock is disabled. This gives
a minimum resolution of 22 ns when the core is operating at
41.78 MHz and with a prescaler of 1. Capture of the current
timer value is enabled if the Timer2 interrupt is enabled via
IRQEN[4].
The counter can be formatted as plain 32-bit value or as
hours:minutes:seconds:hundredths.
Timer2 reloads the value from T2LD either when Timer2
overflows or immediately after T2ICLR is written.
The Timer2 interface consists of four MMRs, as shown in
Table 112.
Table 112. Timer2 Interface MMRs
Name Description
T2LD A 32-bit register. Holds 32-bit unsigned integers.
T2VAL
A 32-bit register. Holds 32-bit unsigned integers.
This register is read only.
T2ICLR
An 8-bit register. Writing any value to this register
clears the Timer2 interrupt.
T2CON The configuration MMR (see Table 113).
Timer2 Load Register
Name Address Default Value Access
T2LD 0xFFFF0340 0x00000 R/W
T2LD is a 32-bit register that holds the 32 bit value that is loaded
into the counter.
Timer2 Clear Register
Name Address Default Value Access
T2ICLR 0xFFFF034C 0x00 W
This 8-bit write-only MMR is written (with any value) by user
code to refresh (reload) Timer2.
Timer2 Value Register
Name Address Default Value Access
T2VAL 0xFFFF0344 0x0000 R
T2VAL is a 32-bit register that holds the current value of Timer2.
Timer2 Control Register
Name Address Default Value Access
T2CON 0xFFFF0348 0x0000 R/W
This 32-bit MMR configures the mode of operation for Timer2.