22.3.3.2 Waveform Generation Modes
The TCD provides four different Waveform Generation modes controlled by the Waveform
Generation Mode (WGMODE) bit field in the Control B (TCDn.CTRLB)
register. The Waveform Generation modes are:
- One Ramp mode
- Two Ramp mode
- Four Ramp mode
- Dual Slope mode
The Waveform Generation modes determine how the counter is counting during a TCD cycle and how the compare values influence the waveform. A TCD cycle is split into these states:
- Dead time WOA (DTA)
- On time WOA (OTA)
- Dead time WOB (DTB)
- On time WOB (OTB)
The Compare A Set (CMPASET), Compare A Clear (CMPACLR), Compare B Set (CMPBSET) and Compare B Clear (CMPBCLR) compare values define when each state ends and the next begins.