English
Language : 

M32C8A Datasheet, PDF (180/372 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M32C/80 Series
M32C/8A Group
15. Timers (Timer A)
15.1.4 Pulse Width Modulation Mode
In pulse width modulation mode, the timer outputs pulse signals of a given width repeatedly. The counter
functions as an 8-bit pulse width modulator or 16-bit pulse width modulator.
Table 15.7 lists specifications of pulse width modulation mode. Figures 15.19 and 15.20 show examples of a
16-bit pulse width modulator and 8-bit pulse width modulator operations.
Table 15.7 Specifications of Pulse Width Modulation Mode
Item
Count source
f1, f8, f2n(1), fC32
Specification
Count operation
• Counter decrements
(The counter functions as the 8-bit or 16-bit pulse width modulator.)
The contents of the reload register are reloaded at the rising edge of the PWM
pulse and the counter decrements. The count continues even if the re-trigger
occurs while counting.
16-bit PWM
• “H” width = n / fj
n: setting value of the TAi register (i = 0 to 4), 0000h to FFFEh
fj: count source frequency
• Cycle = (216 - 1) / fj
The cycle is fixed to this value
8-bit PWM
• “H” width = n x (m + 1) / fj
• Cycle = (28 - 1) x (m + 1) / fj
m: setting value of low-order bit address of the TAi register, 00h to FFh
n: setting value of high-order bit address of the TAi register, 00h to FEh
Count start condition
When a trigger is not used (the MR2 bit in the TAiMR register is 0):
Set the TAiS bit in the TABSR register to 1
When a trigger is used (the MR2 bit in the TAiMR register is 1):
A trigger, selectable from the following occurs while the TAiS bit in the TABSR
register is set to 1(count starts):
• an external trigger is applied to TAiIN pin
• timer B2 overflows or underflows
• timer Aj overflows or underflows (j = i - 1, except j = 4 if i = 0)
• timer Ak overflows or underflows (k = i + 1, except k = 0 if i = 4)
Count stop condition
The TAiS bit is set to 0 (count stops)
Interrupt request generation timing At the falling edge of the PWM pulse
TAiIN pin function
Trigger input
TAiOUT pin function
Pulse output
Read from timer
A read from the TAi register returns undefined value
Write to timer
• A write to the TAi register while the count is stopped:
The value is written to both the reload register and the counter.
• A write to the TAi register while counting:
The value is written to the reload register (It is transferred to the counter at the
next reload timing).(2)
NOTE:
1. Bits CNT3 to CNT0 in the TCSPR register select no division (n = 0) or divide-by-2n (n = 1 to 15).
2. Wait for one count source cycle or more to write after the count starts.
Rev.1.00 Jul 15, 2007 Page 163 of 352
REJ09B0385-0100