English
Language : 

SAM7S256_14 Datasheet, PDF (485/775 Pages) ATMEL Corporation – ARM-based Flash MCU
(with X being 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, or 1024). The resulting period formula will be:
(---2-----×------X-----×------C-----P----R-----D-----)
MCK
By using a Master Clock divided by one of both DIVA or DIVB divider, the formula becomes, respectively:
(---2-----×------C----P-----R----D------×------D-----I--V----A----)-
MCK
or
(---2-----×------C----P-----R----D------×------D-----I--V----B----)-
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--c---h---a----n---n---e----l-_---x---_----c---l-o---c----k----×------C----D-----T----Y-----)---)
(period ⁄ 2)
• 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 34-4. Non Overlapped Center Aligned Waveforms
No overlap
PWM0
PWM1
Period
Note: See Figure 34-5 on page 486 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
SAM7S Series [DATASHEET]
6175M–ATARM–26-Oct-12
485