CHAPTER 9 TIMER/COUNTER FUNCTION
300
User’s Manual U15195EJ5V0UD
(2) Timer unit mode register 0 (TUM0)
The TUM0 register is an 8-bit register used to specify the TM10 operation mode or to control the operation of
the PWM output pin.
TUM0 can be read/written in 8-bit or 1-bit units.
Cautions 1. Changing the value of the TUM0 register during TM10 operation (TM1CE0 bit of TMC10
register = 1) is prohibited.
2. When the CMD bit = 0 (general-purpose timer mode), setting MSEL = 1 (UDC mode B) is
prohibited.
7
CMD
TUM0
6
0
5
0
4
0
3
TOE10
2
ALVT10
1
0
0
MSEL
Address
FFFFF5EBH
After reset
00H
Bit position
Bit name
Function
7
CMD
Specifies TM10 operation mode.
0: General-purpose timer mode (up count)
1: UDC mode (up/down count)
3
TOE10
Specifies timer output (TO10) enable.
0: Timer output disabled
1: Timer output enabled
Caution
When CMD bit = 1 (UDC mode), timer output is not performed
regardless of the setting of the TOE10 bit. At this time, timer output
consists of the negative phase level of the level set by the ALVT10
bit.
2
ALVT10
Specifies active level of timer output (TO10).
0: Active level is high level
1: Active level is low level
Caution
When CMD bit = 1 (UDC mode), timer output is not performed
regardless of the setting of the TOE10 bit. At this time, timer output
consists of the negative phase level of the level set by the ALVT10
bit.
0
MSEL
Specifies operation in UDC mode (up/down count)
0: UDC mode A
TM10 can be cleared by setting the CLR1, CLR0 bits of the TMC10 register.
1: UDC mode B
TM10 is cleared in the following cases.
•
Upon match with CM100 during TM10 up count operation
•
Upon match with CM101 during TM10 down count operation
When UDC mode B is set, the ENMD, CLR1, and CLR0 bits of the TMC10
register become invalid.