s908gr32ag3vfa Freescale Semiconductor, Inc, s908gr32ag3vfa Datasheet - Page 253

no-image

s908gr32ag3vfa

Manufacturer Part Number
s908gr32ag3vfa
Description
M68hc08 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
TOF — TIM2 Overflow Flag Bit
TOIE — TIM2 Overflow Interrupt Enable Bit
TSTOP — TIM2 Stop Bit
TRST — TIM2 Reset Bit
PS[2:0] — Prescaler Select Bits
Freescale Semiconductor
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.
This read/write bit enables TIM2 overflow interrupts when the TOF bit becomes set. Reset clears the
TOIE 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.
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.
These read/write bits select either the T2CH0 pin or one of the seven prescaler outputs as the input to
the TIM2 counter as
1 = TIM2 counter has reached modulo value
0 = TIM2 counter has not reached modulo value
1 = TIM2 overflow interrupts enabled
0 = TIM2 overflow interrupts disabled
1 = TIM2 counter stopped
0 = TIM2 counter active
1 = Prescaler and TIM2 counter cleared
0 = No effect
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.
Setting the TSTOP and TRST bits simultaneously stops the TIM2 counter
at a value of $0000.
MC68HC908GR60A • MC68HC908GR48A • MC68HC908GR32A Data Sheet, Rev. 5
PS[2:0]
Table 18-1
000
001
010
011
100
101
110
111
shows. Reset clears the PS[2:0] bits.
Table 18-1. Prescaler Selection
NOTE
NOTE
Internal bus clock ÷ 16
Internal bus clock ÷ 32
Internal bus clock ÷ 64
Internal bus clock ÷ 2
Internal bus clock ÷ 4
Internal bus clock ÷ 8
Internal bus clock ÷1
TIM2 Clock Source
T2CH0
I/O Registers
253

Related parts for s908gr32ag3vfa