English
Language : 

SAM4S_14 Datasheet, PDF (928/1231 Pages) ATMEL Corporation – ARM-based Flash MCU
39. Pulse Width Modulation Controller (PWM)
39.1
Description
The PWM macrocell controls 4 channels independently. Each channel controls two complementary square output
waveforms. Characteristics of the output waveforms such as period, duty-cycle, polarity and dead-times (also
called dead-bands or non-overlapping times) are configured through the user interface. Each channel selects and
uses one of the clocks provided by the clock generator. The clock generator provides several clocks resulting from
the division of the PWM master clock (MCK).
All PWM macrocell accesses are made through registers mapped on the peripheral bus. All channels integrate a
double buffering system in order to prevent an unexpected output waveform while modifying the period, the duty-
cycleor the dead-times.
Channels can be linked together as synchronous channels to be able to update their duty-cycle or dead-times at
the same time.
The update of duty-cycles of synchronous channels can be performed by the Peripheral DMA Controller Channel
(PDC) which offers buffer transfer without processor Intervention.
The PWM macrocell provides 8 independent comparison units capable of comparing a programmed value to the
counter of the synchronous channels (counter of channel 0). These comparisons are intended to generate
software interrupts, to trigger pulses on the 2 independent event lines (in order to synchronize ADC conversions
with a lot of flexibility independently of the PWM outputs) and to trigger PDCtransfer requests.
The PWM outputs can be overridden synchronously or asynchronously to their channel counter.
The PWM block provides a fault protection mechanism with 8 fault inputs, capable to detect a fault condition and to
override the PWM outputs asynchronously (outputs forced to ‘0’, ‘1’).
For safety usage, some configuration registers are write-protected.
39.2
Embedded Characteristics
 4 Channels
 Common Clock Generator Providing Thirteen Different Clocks
̶ A Modulo n Counter Providing Eleven Clocks
̶ Two Independent Linear Dividers Working on Modulo n Counter Outputs
 Independent Channels
̶ Independent 16-bit Counter for Each Channel
̶ Independent Complementary Outputs with 12-bit Dead-Time Generator (Also Called Dead-Band or
Non-Overlapping Time) for Each Channel
̶ Independent Enable Disable Command for Each Channel
̶ Independent Clock Selection for Each Channel
̶ Independent Period, Duty-Cycle and Dead-Time for Each Channel
̶ Independent Double Buffering of Period, Duty-Cycle and Dead-Times for Each Channel
̶ Independent Programmable Selection of The Output Waveform Polarity for Each Channel
̶ Independent Programmable Center or Left Aligned Output Waveform for Each Channel
̶ Independent Output Override for Each Channel
̶ Independent Interrupt for Each Channel, at Each Period for Left-Aligned or Center-Aligned
Configuration
 2 2-bit Gray Up/Down Channels for Stepper Motor Control
 Synchronous Channel Mode
̶ Synchronous Channels Share the Same Counter
928
SAM4S Series [DATASHEET]
Atmel-11100G-ATARM-SAM4S-Datasheet_27-May-14