Note:
In DSTOP, DSBOTTOM and DSBOTH operation, when TOP is lower than MAX/2, the CCx MSB
bit defines the ramp on which the CCx Match interrupt or event is generated. (Rising if CCx[MSB]=0,
falling if CCx[MSB]=1.)
Related Links
on page 812
Dual-Slope Critical PWM Generation
Dual-Slope Critical PWM Generation
Critical mode generation allows generation of non-aligned centered pulses. In this mode, the period time
is controlled by PER while CCx control the generated waveform output edge during up-counting and CC(x
+CC_NUM/2) control the generated waveform output edge during down-counting.
Figure 36-8. Dual-Slope Critical Pulse Width Modulation (N=CC_NUM)
COUNT
CCx
WO[x]
ZERO
TOP
MAX
"match"
"reload" update
CC(x+N/2)
CCx
CC(x+N/2)
CCx
CC(x+N/2)
Output Polarity
The polarity (WAVE.POLx) is available in all waveform output generation. In single-slope and dual-slope
PWM operation, it is possible to invert the pulse edge alignment individually on start or end of a PWM
cycle for each compare channels. The table below shows the waveform output set/clear conditions,
depending on the settings of timer/counter, direction, and polarity.
Table 36-3. Waveform Generation Set/Clear Conditions
Waveform Generation
operation
DIR POLx Waveform Generation Output Update
Set
Clear
Single-Slope PWM
0
0
Timer/counter matches TOP
Timer/counter matches CCx
1
Timer/counter matches CC
Timer/counter matches TOP
1
0
Timer/counter matches CC
Timer/counter matches ZERO
1
Timer/counter matches ZERO
Timer/counter matches CC
Dual-Slope PWM
x
0
Timer/counter matches CC
when counting up
Timer/counter matches CC
when counting down
1
Timer/counter matches CC
when counting down
Timer/counter matches CC
when counting up
In Normal and Match Frequency, the WAVE.POLx value represents the initial state of the waveform
output.
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
807