40.6.2.5.9 Output Polarity
The polarity (WAVE.POLx) is available in all waveform output generation.
The table below shows the waveform output set/clear conditions, depending on the settings of timer/counter, direction, and polarity.
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 CCx | Timer/counter matches TOP | ||
1 | 0 | Timer/counter matches CCx | Timer/counter matches ZERO | |
1 | Timer/counter matches ZERO | Timer/counter matches CCx | ||
Dual-Slope PWM | x | 0 | Timer/counter matches CCx when counting up | Timer/counter matches CCx when counting down |
1 | Timer/counter matches CCx when counting down | Timer/counter matches CCx when counting up | ||
Dual Compare PWM | 0 | 0 | Timer/Counter match TOP
Timer/counter matches CC[x+WO_NUM/2] | Timer/counter matches CCx |
1 | Timer/counter matches CCx | Timer/Counter match TOP
Timer/counter matches CC[x+WO_NUM/2] | ||
1 | 0 | Timer/counter matches CCx | Timer/Counter match ZERO
Timer/counter matches CC[x+WO_NUM/2] | |
1 | Timer/Counter match ZERO
Timer/counter matches CC[x+WO_NUM/2] | Timer/counter matches CCx |
In Normal and Match Frequency, the WAVE.POLx value represents the initial state of the waveform output.