English
Language : 

MC908GR32AVFAE Datasheet, PDF (253/314 Pages) Freescale Semiconductor, Inc – Microcontrollers
I/O Registers
TOF — TIM2 Overflow Flag Bit
This read/write flag is set when the TIM2 counter resets reaches the modulo value programmed in the
TIM2 counter modulo registers. Clear TOF by reading the TIM2 status and control register when TOF
is set and then writing a 0 to TOF. If another TIM2 overflow occurs before the clearing sequence is
complete, then writing 0 to TOF has no effect. Therefore, a TOF interrupt request cannot be lost due
to inadvertent clearing of TOF. Reset clears the TOF bit. Writing a 1 to TOF has no effect.
1 = TIM2 counter has reached modulo value
0 = TIM2 counter has not reached modulo value
TOIE — TIM2 Overflow Interrupt Enable Bit
This read/write bit enables TIM2 overflow interrupts when the TOF bit becomes set. Reset clears the
TOIE bit.
1 = TIM2 overflow interrupts enabled
0 = TIM2 overflow interrupts disabled
TSTOP — TIM2 Stop Bit
This read/write bit stops the TIM2 counter. Counting resumes when TSTOP is cleared. Reset sets the
TSTOP bit, stopping the TIM2 counter until software clears the TSTOP bit.
1 = TIM2 counter stopped
0 = TIM2 counter active
NOTE
Do not set the TSTOP bit before entering wait mode if the TIM2 is required
to exit wait mode. Also when the TSTOP bit is set and the timer is
configured for input capture operation, input captures are inhibited until the
TSTOP bit is cleared.
TRST — TIM2 Reset Bit
Setting this write-only bit resets the TIM2 counter and the TIM2 prescaler. Setting TRST has no effect
on any other registers. Counting resumes from $0000. TRST is cleared automatically after the TIM2
counter is reset and always reads as 0. Reset clears the TRST bit.
1 = Prescaler and TIM2 counter cleared
0 = No effect
NOTE
Setting the TSTOP and TRST bits simultaneously stops the TIM2 counter
at a value of $0000.
PS[2:0] — Prescaler Select Bits
These read/write bits select either the T2CH0 pin or one of the seven prescaler outputs as the input to
the TIM2 counter as Table 18-1 shows. Reset clears the PS[2:0] bits.
PS[2:0]
000
001
010
011
100
101
110
111
Table 18-1. Prescaler Selection
TIM2 Clock Source
Internal bus clock ÷1
Internal bus clock ÷ 2
Internal bus clock ÷ 4
Internal bus clock ÷ 8
Internal bus clock ÷ 16
Internal bus clock ÷ 32
Internal bus clock ÷ 64
T2CH0
MC68HC908GR60A • MC68HC908GR48A • MC68HC908GR32A Data Sheet, Rev. 5
Freescale Semiconductor
253