BAT32G1x9 user manual | Chapter 6 Universal timer unit Timer4/8
200 / 1149
Rev.1.02
TImn :
The TImn
pin input signal
TCRmn: Timer count register
mn
(TCRmn).
TDRmn: Timer data register
mn
(TDRmn).
OVF: Bit 0
of
the timer status register
mn
(TSRmn
).
Fig. 6-52 Example of register setting value at the measurement input pulse interval
(a) Timer mode register mn (TMRmn).
CKSmn1
1/0
CKSmn0
0
0
CCSmn
0
M/S
注
0
STSmn2
0
STSmn1
0
STSmn0
1
CISmn1
1/0
CISmn0
1/0
0
0
MDmn3
0
MDmn2
1
MDmn1
0
MDmn0
1/0
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
15
TMRmn
operation mode of Channel N
010B: capture mode
operation configuration when start counting
0: when start counting, not to generate INTTMmn and do not generate inverted Phase Timer output.
1: when start counting, generate INTTMmn and generate inverted Phase Timer output.
capture trigger selection
001B: Select Timn pin input valid edge
MASTERmn bit configuration (Channel 2)
0: Independent Channel operation
SPLITmn bit configuration (Channel 1, 3)
0: 16 bit Timer
Count clock selection
0: Select operational clock (fMCK)
operational clock (fMCK) selection
00B: select CKm0 as operational clock of Channel n
10B: select CKm1 as operational clock of Channel n.
01B: select CKm2 as operational clock of Channel 1,3.(only Channle 1,3 can select the value)
11B: select CKm3 as operational clock of Channel 1,3.(only Channle 1,3 can select the value)
Timn Pin input edge selection
00B: Detect falling edge
01B: Detect rising edge
10B: Detect both edges
11B: reserved
(b) The timer output register m (TOm).
bit n
TOm
TOmn
0
0: Outputs "0"
by
TOmn.
(c) The timer output enable register m (TOEm).
bit n
TOEm TOEmn
0
0: Stops the TOmn
output
made by the count run.
(d) The timer output level register m(TOLm).
bit n
TOLm
TOLmn
0
0: "0" in the master channel output mode (TOMmn=0).
(e) Timer output mode register m (TOMm).
bit n
TOMm TOMmn
0
0: Set the main control channel output mode.
Note: TMRm2, TMRm4, TMRm6: MASTERmn bit
TMRm1, TMRm3: SPLITmn bit
TMRm0,
TMRm5,
TMRm7: Fixed to "0".
Remark: m: unit number (m=0,1) n: channel number (when m=0: n=0~3, m=1: n=0~7).