
350
Bits 4 and 3—Clock Edge 1 and 0 (CKEG1, CKEG0): These bits select the input clock edge.
When the input clock is counted using both edges, the input clock period is halved (e.g. /4 both
edges = /2 rising edge). If phase counting mode is used on channels 1 and 2, this setting is
ignored and the phase counting mode setting has priority.
Bit 4
Bit 3
CKEG1
CKEG0
Description
0
Count at rising edge
(Initial value)
1
Count at falling edge
1
—
Count at both edges
Note:
Internal clock edge selection is valid when the input clock is /4 or slower. This setting is
ignored if the input clock is /1, or when overflow/underflow of another channel is selected.
Bits 2 to 0—Time Prescaler 2 to 0 (TPSC2 to TPSC0): These bits select the TCNT counter
clock. The clock source can be selected independently for each channel. Table 10-4 shows the
clock sources that can be set for each channel.
Table 10-4 TPU Clock Sources
Channel
Internal Clock
External Clock
Channel
/1
/4
/16
/64
/256
/1024 /4096
TCLKA TCLKB TCLKC TCLKD
0
1
2
Legend
: Setting
Blank : No setting
Bit 2
Bit 1
Bit 0
Channel
TPSC2
TPSC1
TPSC0
Description
0000
Internal clock: counts on /1
(Initial value)
1
Internal clock: counts on /4
1
0
Internal clock: counts on /16
1
Internal clock: counts on /64
1
0
External clock: counts on TCLKA pin input
1
External clock: counts on TCLKB pin input
1
0
External clock: counts on TCLKC pin input
1
External clock: counts on TCLKD pin input