BAT32G1x9 user manual | Chapter 7 Timer A
241 / 1149
Rev.1.02
7.3.6
Timer A controls register 0 (TAMR0).
The TAMR0 register is the register that sets the operating mode of register A. The TAMR0 register is
set via the 8-bit memory operation instruction.
After generating the reset signal, the value of the TAMR0 register changes to "00H".
Figure 7-7 Timer A controls the format of register 0 (TAMR0).
Address: 40042After 242H
reset:
00H R/W
Symbol
76543210
TAMR0
TCK2
TCK1
TCK0
The counting source for timer A is selected
note
1
and
2
0
0
0
f
CLK
0
0
1
f
CLK
/8
0
1
1
f
CLK
/2
1
0
0
f
II
1
0
1
EventC input event
1
1
0
f
SUB
Other than the above
Prohibit settings.
TEDGPL
TAIO edge polarity selection
note
5
0
One edge
1
Bilateral along
TMOD2
TMOD1
TMOD0
Timer A
operating mode select
Note
3
0
0
0
Timer mode
0
0
1
Pulse output mode
0
1
0
Event counter pattern
0
1
1
Pulse width measurement mode
1
0
0
Pulse period measurement mode
Other than the above
Prohibit settings.
Note 1
If you select the event counter mode, the external input (TAIO) is selected as the counting source,
regardless of
the setting of
TCK0~TCK2
bits.
2. You cannot switch the counting source during the counting process. If you want to switch the count source, you
must
ha
ve "0" in
both
the
TSTART
bit and
the TSTF
bit in the
TACR0
register
(Stop Counting) when toggling.
3. The operating mode can only be changed when the stop count (
both
the TSTART
bit and
the TSTF
bit of
the
TACR0
register
are
"0"
(stop count)), and cannot be
changed during the counting process.
4. To select
f
IL
as the counting source, the subsystem clock must be supplied with the mode control register (OSMC)
of
the WUTMMCK0
position
"1". However, when f
SUB
is
selected
as the counting source for the real-time clock
or
the 12-bit
interval timer, f IL cannot be selected
as the counting source for
timer
A.
5. The TEDGPL bit is only valid in event counter mode.
6. Initialize the output of the
TAO
pin and
the TAIO
pin of
timer
A
by writing
the
TAMR0
register
. For output levels
at initialization, refer to
the format of
figure
7-6
timer
AI/O
control register
0
(TAIOC0). "
description.
0
TCK2
TCK1
TCK0
TEDGPL
TMOD2
TMOD1
TMOD0
TIOGT1
TIOGT0
TIPF1
TIPF0
0
TOENA
0
TEDGSEL
0
0
TUNDF
TEDGF
0
TSTOP
TCSTF
TSTART