Figure 36-4. Normal Frequency Operation
COUNT
MAX
TOP
ZERO
CCx
WO[x]
Direction Change
Period (T)
COUNT Written
"reload" update
"clear" update
"match"
Match Frequency (MFRQ)
For Match Frequency generation, the period time (T) is controlled by CC0 register instead of PER. WO[0]
toggles on each update condition.
Figure 36-5. Match Frequency Operation
COUNT
MAX
CC0
COUNT Written
Direction Change
ZERO
WO[0]
"reload" update
"clear" update
Normal Pulse-Width Modulation (NPWM)
NPWM uses single-slope PWM generation.
Single-Slope PWM Operation
For single-slope PWM generation, the period time (T) is controlled by Top value, and CCx controls the
duty cycle of the generated waveform output. When up-counting, the WO[x] is set at start or compare
match between the COUNT and TOP values, and cleared on compare match between COUNT and CCx
register values. When down-counting, the WO[x] is cleared at start or compare match between the
COUNT and ZERO values, and set on compare match between COUNT and CCx register values.
Figure 36-6. Single-Slope PWM Operation
COUNT
MAX
TOP
"match"
ZERO
CCx=ZERO
CCx
CCx=TOP
"clear" update
WO[x]
The following equation calculates the exact resolution for a single-slope PWM (R
PWM_SS
) waveform:
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
805