25.3.3.2 Waveform Generation Modes

The TCF provides four waveform generation modes controlled by the Waveform Generation Mode (WGMODE) bit field in the Control B (TCFn.CTRLB) register. The waveform generation modes are:
  • Frequency generation
  • NCO Pulse-Frequency
  • NCO Fixed Duty Cycle
  • 8-bit PWM
The registers functionality might be different for each mode and is summarized in the table below:
Table 25-4. Registers - Mode Differences
ModeCNT2CNT1CNT0CMP2CMP1CMP0CMP1 FlagCMP0 FlagOVF Flag
Frequency GenerationCounterCompare/TOPCMP Match(1)CMP Match(1)TOP
NCO Pulse-FrequencyCounter/AccumulatorIncrementWO pulse endWO pulse startMAX
NCO Fixed Duty-CycleCounter/AccumulatorIncrementMAX(1)MAX(1)MAX
8-bit PWM-PeriodCounter-Compare 1Compare 0CMP1 MatchCMP0 MatchTOP
Note:
  1. CMP0 and CMP1 interrupts and events are generated on alternating overflows where one will match the rising edge of the waveform and the other the falling edge. An overflow interrupt/event is generated on all overflows.