
9 - 7
9
MSM66587 Family User's Manual
Chapter 9 16-Bit RTO/PWM Timer
9.3.2
Register Module (TMR8, TMR9) Operation
TMRMODE can select one of three functions for a register module.
Realtime output mode (RTO)
Toggle realtime output mode (toggle RTO)
PWM mode
(1) Realtime Output Mode (RTO) Operation
When the TM1 counter is running, its value will continuously be compared to TMR8 and TMR9.
When the values match, a realtime output interrupt request will be generated and the contents
of TnBF0 of RTOCON4 or RTOCON5 (bit 1) will be loaded in TnOUT (bit 0), where n = 8 or 9.
Therefore, set TMR8 and TMR9 to the desired time interval until the next event change, and
set TnFB0 to the desired level after the next event change.
Figure 9-8 shows an operation example of a register module in RTO mode.
To use RTO8 and RTO9 as realtime output pins, be sure to set the corresponding bits in the
Port 2 Secondary Control Register to 1.
(2) Toggle Output Realtime Output Mode (Toggle RTO) Operation
When the TM1 counter is running, its value will continuously be compared to TMR8 and TMR9.
When the values match, a realtime output interrupt request will be generated and the contents
of TnBF0 of RTOCON4 or RTOCON5 (bit 1) will be loaded in TnOUT (bit 0), where n = 8 or 9.
The contents of TnFB0 of RTOCON4 or RTOCON5 will then be immediately and automatically
inverted.
Figure 9-9 shows an operation example of a register module in toggle RTO mode.
To use RTO8 and RTO9 as realtime output pins, be sure to set the corresponding bits in the
Port 2 Secondary Control Register to 1.
(3) PWM Mode Operation
TMR8 and TMR9 can operated in PWM mode as a pair. When PWM mode is specified and
the TM1 counter is running, its value will continuously be compared to TMR8. When the values
match, an interrupt request will be generated, and the PWM flip-flop will be set (1). When the
TM1 counter is running, its value will also continuously be compared to TMR9. When the
values match, an interrupt request will be generated, and the PWM flip-flop will be reset (0).
If a set and reset for the PWM flip-flop occur simultaneously, then the reset will take
precedence.
The Q (true) output of the PWM flip-flop will be output from RTO8, and the Q (inverted) output
will be output from RTO9.
In PWM mode, TnBF0 (bit 1) and TnOUT (bit 0) of RTOCON4 and RTOCON5 will be invalid (n
= 8, 9).
Figure 9-10 shows an operation example of a register module in PWM mode.
To use RTO8 and RTO9 as PWM output pins, be sure to set the corresponding bits in the Port
2 Secondary Control Register to 1.