
BAT32G1x9 user manual | Chapter 6 Universal timer unit Timer4/8
155 / 1149
Rev.1.02
6.3.4
Timer status register mn (TSRmn).
The TSRmn register is a register that represents the overflow status of the channel n counter.
The TSRmn register is only valid in capture mode (MDmn3~MDmn1=010B) and capture single counting mode
(MDmn3~MDmn1=110B). For changes in the OVF bits in each operating mode and set/clear conditions, refer to
Table 6-5.
Read the TSRmn registers via the 16-bit memory operation instructions.
User can read the lower 8 bits of the TSRmn register with TSRmnL and read the TSRmn register through the 8-
bit memory operation instruction. After generating a reset signal, the value of the TSRmn register changes to
"0000H".
Figure 6-12 timer status register mn (TSRmn).
symbol
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
TSRmn
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
OVF
OVF
Counter overflow status for channel n
0
No overflow occurred.
1
Overflow occurs.
If the OVF
bit is
"1", clear this flag (OVF=0) just when the next count does not overflow and the count value is
captured.
Note: m: unit number (m=0,1)n: channel number (when m=0: n=0~3, m=1: n=0~7).
Table 6-5 Variation of OVF bits and setting/clearing conditions in each operating mode
Timer operating mode
OVF bit
Set/clear conditions
• Capture mode
• Capture
&
Single Count mode
clear
No overflow occurred during capture
Set
An overflow occurs while captureping
• Interval timer mode
•Event counter mode
• Single count mode
clear
—
(Cannot be used)
Set
Note: Even if the counter overflows, the OVF
bit does not change immediately, but during subsequent captures.