![](http://datasheet.mmic.net.cn/100000/IF180C52TXXX-20R_datasheet_3493957/IF180C52TXXX-20R_523.png)
523
32099I–01/2012
AT32UC3L016/32/64
When writing a one to CR.TCLR, the timebase counter and the spread spectrum counter are
reset at their lower limit values and the effective top value of the timebase counter will also be
reset.
23.6.4
Duty Cycle and Waveform Properties
Each PWM channel has its own duty cycle value (DCV) which is write-only and cannot be read
out. The duty cycle value can be changed in two approaches as described in
Section23.6.5.When the duty cycle value is zero, the PWM output is zero. Otherwise, the PWM output is set
when the timebase counter is zero, and cleared when the timebase counter reaches the duty
cycle value. This is summarized as:
Note that when increasing the duty cycle value for one channel from 0 to 1, the number of GCLK
cycles when the PWM waveform is high will jump from 0 to 2. When incrementing the duty cycle
value by one for any other values, the number of GCLK cycle when the waveform is high will
increase by one. This is summarized in
Table 23-2.
Every other output PWM waveform toggles on the negative edge of the GCLK instead of the
positive edge. This is to avoid too many I/O toggling simultaneously on the output I/O lines.
23.6.5
Updating Duty Cycle Values
23.6.5.1
Interlinked Single Value PWM Operation
The PWM channels can be interlinked to allow multiple channels to be updated simultaneously
with the same duty cycle value. This value must be written to the Interlinked Single Value Duty
(ISDUTY) register. Each channel has a corresponding enabling bit in the Interlinked Single
Value Channel Set (ISCHSETm) register. When a bit is written to one in the ISCHSETm register,
the duty cycle register for the corresponding channel will be updated with the value stored in the
ISDUTY register. It can only be updated when the READY bit in the Status Register
shows the writing procedure. It is thus possible to update the duty cycle values for up to 32 PWM
channels within one ISCHSETm register at a time.
Table 23-2.
PMW Waveform Duty Cycles
Duty Cycle Value
#Clock Cycles
When Waveform is High
#Clock Cycles
When Waveform is Low
00
ETV+1
12
ETV-1
23
ETV-2
...
ETV-1
ETV
1
ETV
ETV+1
0
PWM Waveform =
low when DCV
0 or
TC DCV
>
=
high when TC DCV and DCV 0
≠
≤