English
Language : 

SAM7X128_14 Datasheet, PDF (411/662 Pages) ATMEL Corporation – ARM-based Flash MCU
(---2----×-----C-----P----R----D-----×-----D-----I--V----A----)- or (---2----×-----C-----P----R----D-----×-----D-----I--V----B----)-
MCK
MCK
 the waveform duty cycle. This channel parameter is defined in the CDTY field of the PWM_CDTYx register.
If the waveform is left aligned then:
duty cycle = (---p---e---r---i--o---d-----–----1-----⁄--f--c---h---a---n---n---e--l--_---x---_---c---l-o---c---k-----×----C-----D----T----Y----)
period
If the waveform is center aligned, then:
duty cycle = -(--(--p----e---r--i--o----d----⁄---2---)----–----1-----⁄(--f-p-c--e-h--r-a--i-n-o--n-d--e--l-⁄-_-2--x--)-_---c---l-o---c---k----×-----C-----D----T----Y----)---)
 the waveform polarity. At the beginning of the period, the signal can be at high or low level. This property is
defined in the CPOL field of the PWM_CMRx register. By default the signal starts by a low level.
 the waveform alignment. The output waveform can be left or center aligned. Center aligned waveforms can be
used to generate non overlapped waveforms. This property is defined in the CALG field of the PWM_CMRx
register. The default mode is left aligned.
Figure 33-4. Non Overlapped Center Aligned Waveforms
No overlap
PWM0
PWM1
Period
Note: See Figure 33-5 on page 412 for a detailed description of center aligned waveforms.
When center aligned, the internal channel counter increases up to CPRD and.decreases down to 0. This ends the period.
When left aligned, the internal channel counter increases up to CPRD and is reset. This ends the period.
Thus, for the same CPRD value, the period for a center aligned channel is twice the period for a left aligned channel.
Waveforms are fixed at 0 when:
 CDTY = CPRD and CPOL = 0
 CDTY = 0 and CPOL = 1
Waveforms are fixed at 1 (once the channel is enabled) when:
 CDTY = 0 and CPOL = 0
 CDTY = CPRD and CPOL = 1
The waveform polarity must be set before enabling the channel. This immediately affects the channel output level.
Changes on channel polarity are not taken into account while the channel is enabled.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
411