![Atmel SAM4S Series Preliminary Data Sheet Download Page 913](http://html1.mh-extra.com/html/atmel/sam4s-series/sam4s-series_preliminary-data-sheet_3003408913.webp)
913
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
If the waveform is center aligned, then:
• 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 37-4. Non Overlapped Center Aligned Waveforms
Note:
1. See
for a detailed description of center aligned waveforms.
When center aligned, the channel counter increases up to CPRD and decreases down to 0. This
ends the period.
When left aligned, the 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.
Modifying CPOL in
“PWM Channel Mode Register” on page 970
can lead to an unexpected behavior of the device being driven by PWM.
Besides generating output signals OCx, the comparator generates interrupts in function of the
counter value. When the output waveform is left aligned, the interrupt occurs at the end of the
counter period. When the output waveform is center aligned, the bit CES of the PWM_CMRx
register defines when the channel counter interrupt occurs. If CES is set to 0, the interrupt
duty cycle
period
1
fchannel_x_clock
CDTY
×
⁄
–
(
)
period
------------------------------------------------------------------------------------------------------------
=
duty cycle
period
2
⁄
(
)
1
fchannel_x_clock
CDTY
×
⁄
–
(
) )
period
2
⁄
(
)
------------------------------------------------------------------------------------------------------------------------------
=
OC0
OC1
Period
No overlap
Summary of Contents for SAM4S Series
Page 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Page 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...