445
16-bit Multi-Purpose Timer G (TMG)
Chapter 13
Preliminary User’s Manual U17566EE1V2UM00
(3)
OCTLGn - Timer Gn output control register
This register controls the timer output from the TOGnm pin and the capture or
compare modus for the GCCnm register.
Access
This register can be read/written in 16-bit, 8-bit or 1-bit units.
The low byte OCTLGn.bit[7:0] is accessible separately under the name
OCTLGnL, the high byte OCTLGn.bit[15:8] under the name OCTLGnH.
Address
OCTLGn, OCTLGnL:
<base> + 4
H
OCTLGnH:
<base> + 5
H
Initial Value
4444
H
. This register is cleared by any reset.
Caution
1.
When the POWERn bit is set, the rewriting of CCSGnm is prohibited
2.
When the POWERn bit and TMGn0E bit (TMGn1E bit) are set at the same
time, the rewriting of the ALVGnm bits is prohibited.
15
14
13
12
11
10
9
8
SWFGn4
ALVGn4
CCSGn4
0
SWFGn3
ALVGn3
CCSGn3
0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
7
6
5
4
3
2
1
0
SWFGn2
ALVGn2
CCSGn2
0
SWFGn1
ALVGn1
CCSGn1
0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Table 13-6
OCTLGn register contents
Bit position
Bit name
Function
15, 11, 7, 3
SWFGnm
Fixes the TOGnm pin output level according to the setting of ALVGnm bit.
0: disable TOGnm to inactive level
1: enable TOGnm
14, 10, 6, 2
ALVGnm
Specifies the active level of the TGOnm pin output.
0: Active level is 0
1: Active level is 1
Caution:
Don’t write this bit, before ENFGn0 or ENFGn1 of TMGSTn is 0, so first
clear TMGn0E or TMGn1E bit of the TMGMn register and check
ENFGn0 or ENFGn1 bit before writing.
13, 9, 5, 1
CCSGnm
Specifies Capture/Compare mode selection:
0: Capture mode:
if external edge is detected the INTCCGnm interrupt occurs, the
corresponding counter value is written to GCCnm
1: Compare mode:
if GCCnm matches with corresponding timebase the INTCCGnm interrupt
occurs, if SWFGm is set the PWM output mode is set
Caution:
Don’t write this bit, before POWERn bit of TMGMnH is 0.
electronic components distributor