BAT32G1x9 user manual | Chapter 10 Timer M
365 / 1149
Rev.1.02
10.4 Common things about multiple patterns
10.4.1
Counting sources
The method of selecting the counting source is the same for all patterns. However, in PWM3 mode, an
external clock cannot be selected.
Table 10-9
Selection of counting sources
Counting source
Selection method
f
CLK
, f
CLK
/2, f
CLK
/4, f
CLK
/8,
f
CLK
/32
The counting source is selected by the
TCK2~TCK0 bits of the TMCRi register.
External input signal of
the TMCLK pin
The STCLK bit of the TMFCR register is "1" (the external clock input is valid).
The TCK2~TCK0 bits of the TMCRi register are "101B" (the counting
source is an external clock). The effective edge is selected by the
CKEG1 to CKEG0 bits of the TMCRi register.
The bit of the port mode register of the multiplexed I/O port of the TMCLK pin is "1" (input
mode).
Note i = 0, 1
Figure 10-41
Block diagram of counting source selection
FRQSEL4=0
FRQSEL4=1
f
CLK
f
HOCO
f
CLK
/2
f
CLK
/4
f
CLK
/8
f
CLK
/32
TCK2~TCK0
=001B
=010B
=011B
=100B
select valid edge
CKEG0,CKEG1
STCLK=0
counting source
Tmi register
TMCLK/
TMIOA0
STCLK=1
TMIOA0 input/output or IO port
=101B
Note
i = 0,1
The pulse width of the external clock input to the TMCLK pin must be at least 3 timer M operating clock (f
CLK
)
cycles.