Operation In Tio Pwm Output Mode - Renesas M32R/ECU Series User Manual

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

10

10.4.11 Operation in TIO PWM Output Mode

(1) Outline of TIO PWM output mode
In PWM output mode, the timer uses two reload registers to generate a waveform with a given duty cycle.
When the timer is enabled (by writing to the enable bit in software or by external input) after setting the initial
values in the reload 0 and reload 1 registers, the counter is loaded with the reload 0 register value and starts
counting down synchronously with the count clock. The first time the counter underflows, it is loaded with the
reload 1 register value and continues counting. Thereafter, the counter is loaded with the reload 0 and reload
1 register values alternately each time an underflow occurs. The (reload 0 register set value + 1) and (reload
1 register set value + 1) respectively are effective as count values. The timer stops at the same time count is
disabled by writing to the enable bit (and not in synchronism with PWM output period).
The F/F output waveform in PWM output mode is inverted (F/F output level changes from low to high or vice
versa) when the counter starts counting and each time it underflows. An interrupt request can be generated
when the counter underflows every other time (second time, fourth time and so on) after being enabled.
Note that TIO's PWM output mode does not have the count correction function.
Count clock
Counter
Reload 0 register
Reload 1 register
TIO interrupt request
due to underflow
Note: • This diagram does not show detailed timing information.
Figure 10.4.9 Typical Operation in PWM Output Mode
Enabled
(by writing to the enable bit
or by external input)
Enable bit
Count down from
the reload 0
register set value
H'FFFF
Undefined
value
H'A000
H'0000
H'A000
H'C000
F/F output
Data inverted by
enable
10.4 TIO (Input/Output-Related 16-Bit Timer)
Underflow
(first time)
(second time)
Count down from
the reload 1
register set value
H'(C000-1)
H'C000
H'A000
H'(A000-1)
Data inverted by
Data inverted by
underflow
PWM output period
10-117
MULTIJUNCTION TIMERS
Underflow
Count down from
the reload 1
register set value
H'(A000-1)
underflow
32180 Group User's Manual (Rev.1.0)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents