An important use of counter channels is the generation of precisely
timed pulses. There are two variations of this use – “one-pulse” pulses, in
which a single pulse is generated, and pulse width modulation, in which a series of pulses is generated with the counter UEV period. The pulse width is
controlled by the Capture/Compare Register (CCR). For example, the channel
output (OCxREF) may tied to whether the CNT register is greater (or less)
than the Compare register. In Figure 10.4 we illustrate the use of two channels
for one-pulse and PWM outputs. Here we assume that the ARR is 7 and the
CCR is 3. In PWM mode, ARR controls the period, and CCR controls the
pulse width (and hence the duty cycle). In one-pulse mode, the pulse begins
CCR cycles after an initial trigger event, and has a width of ARR-CRR. It
is possible to use multiple channels to create a set of synchronized, pulses
beginning at precise delays from each other