BAT32G1x9 user manual | Chapter 7 Timer A
233 / 1149
Rev.1.02
7.2 Structure of timer A
The block diagram and pin structure of Timer A are shown in Figure 7-1 and Table 7-2, respectively.
Figure 7-1 Block diagram of Timer A
f
CLK
f
CLK
/8
f
CLK
/2
f
IL
注
2
f
SUB
EVENTC input event
TIOGT1
,
TIOGT0
frequent event counting
Event count during INTP4 assigned
polarity period.
Note2
Timer output event count during signal
assigned poliarity period.
Note 2
TMIOD1
TMIOC1
TO02
TO03
TIPF1
,
TIPF0
f
CLK
f
CLK
/8
f
CLK
/32
TIPF1
,
TIPF0
=01B or 10B
TAIO0 pin
TAO0 pin
write TAMR0 register.
Write "1" to TSTOP.
Bistable flip-flop
measurement
completion
singal
TIMER A
interrupt
TA
counter
TMOD2~TMOD0
=011B or 100B
Counter
Control
circuit
polarity
selection
Single edge /
double edge
swtich
digital
filter
=00B
TMOD2~TMOD0=001B
Other than
TMOD2~
TMOD0
=010B
=010B
TSTART
16 bit counter
data bus
16 bit
reload
register
underflow singal
TEDGPL
TEDGSEL
TEDGSEL=1
TEDGSEL=0
=000B
=001B
=011B
=100B
=101B
=110B
=00B
=01B
=10B
=00B
=01B
=10B
=11B
RCCPDEL1,
RCCPSEL0
=01B
=10B
=11B
TCK2~TCK0
Note 1
To select
f
IL
as the counting source, the subsystem clock must be supplied with the mode control register
(OSMC) at
WUTMMCK0
position
"1". However, when f
SUB
is
selected
as the counting source for the real-time
clock or
the 15-bit
interval timer, f IL cannot be selected
as the timer
A The count source.
2. RCCPSEL2
bit selectable polarity
through
the TAISR0
register
.
Table 7-2
Timer A Pin Structure
Pin name
Input/Output
function
INTP4
input
Event counter mode control for
timer
A
TAIO
Note
Input/Output
External event input and pulse output for
timer
A
TAO
Note
output
Pulse output of
timer
A
Note the configuration of the
TAO
pin can be
selected
by the
PIOR12
bit and
the PIOR13 bit of the PIOR1
register,
and the
PIOR10
can be passed by
the
PIOR1
register
Bits and
PIOR11
bits select
the
configuration of the TAIO pins.
For details, please refer to
"Chapter
2
Pin Functions".