R01UH0092EJ0110 Rev.1.10
Page 269 of 807
Jul 31, 2012
M16C/64C Group
17. Timer A
17.3.1.3
Count Source
Internal clocks are counted in timer mode, one-shot timer mode, PWM mode, and programmable
output mode. Refer to Figure 17.1 “Timer A and B Count Sources” for details. Table 17.5 lists the Timer
A Count Sources.
f1 is any of the clocks listed below (refer to 8. “Clock Generator” for details).
•
Main clock divided by 1 (no division)
•
PLL clock divided by 1 (no division)
•
fOCO-S divided by 1 (no division)
When f1 or the main clock is used for the timer A and timer B count source, set the PCKSTP11 bit in the
PCLKSTP1 register to 0 (f1 supply enabled).
When the clock mode is PLL operating mode, high-speed mode, medium-speed mode, or wait mode,
the main clock can be used for the timer A and timer B count source instead of f1. Use the PCKSTP17
bit in the PCLKSTP1 register to select the clock (refer to 17.2.3 “Peripheral Clock Stop Register 1
(PCLKSTP1)”).
When using wait mode, if the CM02 bit in the CM0 register is set to 1 (peripheral function clock f1 stops
in wait mode) before entering wait mode, the main clock is also stopped. Therefore, when the
PCKSTP17 bit is 1 and timer A or timer B is used while in wait mode, do not set the CM02 bit to 1.
When in PLL operating mode, high-speed mode, medium-speed mode, or wait mode, the main clock
can be used for the timer A and timer B count source instead of f1. Use the PCKSTP17 bit in the
PCLKSTP1 register to select the clock (refer to 17.2.3 “Peripheral Clock Stop Register 1
(PCLKSTP1)”).
Table 17.5
Timer A Count Sources
Count
Source
Bit Setting Value
Remarks
PCLK0
TCS3
TCS2 to
TCS0
TCK1
to
TCK0
TCS7
TCS6 to
TCS4
f1TIMAB
1
0
-
00b
f1
1
000b
-
f2TIMAB
0
0
-
00b
f1 divided by 2
1
000b
-
f8TIMAB
-
0
-
01b
f1 divided by 8
1
001b
-
f32TIMAB
-
0
-
10b
f1 divided by 32
1
010b
-
f64TIMAB
-
1
011b
-
f1 divided by 64
fOCO-S
-
1
101b
-
fOCO-S
fC32
-
0
-
11b
fC32
1
110b
-
PCLK0: Bit in the PCLKR register
TCS7 to TCS0: Bits in registers TACS0 to TACS2
TCK1 to TCK0: Bits in the TAiMR register (i = 0 to 4)
Summary of Contents for M16C Series
Page 846: ...M16C 64C Group R01UH0092EJ0110...