322
Chapter 10
Timer
Preliminary User’s Manual U15839EE1V0UM00
10.3.6 Explanation of basic operation
(1)
Overview of the mode settings
The Timer Gn includes 2 channels of 16-bit counters (TMGn0/TMGn1), which can operate as
independently timebases. TMGn0 (TMGn1) can be set by CCSG0 bit (CCSG5 bit) in the following
modes:
- free-run mode,
- match and clear mode.
When a timer output (TOGnm) or INTCCGnm interrupt is used, one of the two counters can be
selected by setting the TBGm bit (m = 1 to 4) of the TMGCMHn register.
The tables below indicate the interrupt output and timer output states dependent on the register
setting values.
Table 10-5:
Interrupt output and timer output states
dependent on the register setting values
Notes: 1. An interrupt is generated only when the value of the GCCn0 register is FFFFH.
2. An interrupt is generated only when the value of the GCCn0 register is not FFFFH.
Remark:
The setting of the CCSGm bit in combination with the SWFGm bit sets the mode for the tim-
ing of the actualization of new compare values.
•
In compare mode the new compare value will be immediately active.
•
In PWM mode the new compare value will be active first after the next overflow or
match & clear of the assigned counter (TMG0, TMG1).
Register setting value
State of each output pin
CCSG0n
TBGm
SWFGm
CCSGm
INTTMGn0
INTCCGn0
INTCCGnm
TOGnm
0
Free-run
mode
0
0
0
Overflow
interrupt
TI0 edge
detection
TIm edge
detection
Tied to inactive
level
1
CMPGm match
1
0
TIm edge
detection
1
CMPGm match
PWM
(free run)
1
Match and
clear mode
0
0
Overflow
interrupt
Note 1
CMPG0
match
Note 2
TIm edge
detection
Tied to inactive
level
1
CMPGm match
1
0
TIm edge
detection
1
CMPGm match
PWM
(match and clear)
Summary of Contents for mPD703128
Page 6: ...6 Preliminary User s Manual U15839EE1V0UM00 ...
Page 20: ...20 Preliminary User s Manual U15839EE1V0UM00 ...
Page 32: ...32 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 154: ...154 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 238: ...238 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 356: ...356 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 522: ...522 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 600: ...600 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 610: ...610 Preliminary User s Manual U15839EE1V0UM00 ...
Page 612: ......