AT32UC3C1512C Automotive Atmel Corporation, AT32UC3C1512C Automotive Datasheet - Page 988

no-image

AT32UC3C1512C Automotive

Manufacturer Part Number
AT32UC3C1512C Automotive
Description
Manufacturer
Atmel Corporation
33.6.5
33.6.5.1
9166C–AVR-08/11
PWM Controller Operations
Initialization
Before enabling the channels, they must have been configured by the software application:
• Unlock user interface by writing the WPCMD field in the WPCR Register.
• Configuration of the clock generator (DIVA, PREA, DIVB, PREB, CLKSEL in the CLK register
• Selection of the clock for each channel (CPRE field in the CMRx register)
• Configuration of the waveform alignment for each channel (CALG field in the CMRx register)
• Selection of the counter event selection (if CALG=1) for each channel (CES field in the CMRx
• Configuration of the output waveform polarity for each channel (CPOL in the CMRx register)
• Configuration of the period for each channel (CPRD in the CPRDx register). Writing in
• Configuration of the duty-cycle for each channel (CDTY in the CDTYx register). Writing in
• Configuration of the dead-time generator for each channel (DTH and DTL in DTx) if enabled
• Selection of the synchronous channels (SYNCx in the SCM register)
• Selection of the moment when the WRDY bit and the corresponding PDCA transfer request
• Configuration of the update mode (UPDM in the SCM register)
• Configuration of the update period (UPR in the SCUP register) if needed.
• Configuration of the comparisons (CMPxV and CMPxM).
• Configuration of the event lines (ELxMR).
• Configuration of the fault inputs polarity (FPOL in FMR)
• Configuration of the fault protection (FMOD and FFIL in FMR, FPV and FPE1)
• Enable of the interrupts (writing CHIDx and FCHIDx in IER1 register, and writing WRDYE,
• Enable of the channels (writing CHIDx in the ENA register)
if required). After writing CLKSEL to a new value, no write in any PWM registers must be
attempted before a delay of 2 master clock periods (CLK_PWM). This is the time needed by
the PWM to switch the internal clock (CCK).
register)
CPRDx register is possible while the channel is disabled. After validation of the channel, the
user must use CPRDUPDx register to update CPRDx as explained below.
CDTYx register is possible while the channel is disabled. After validation of the channel, the
user must use CDTYUPDx register to update CDTYx as explained below.
(DTE bit in the CMRx register). Writing in the DTx register is possible while the channel is
disabled. After validation of the channel, the user must use DTUPDx register to update DTx
are set (PTRM and PTRCS in the SCM register)
UNRE, CMPMx and CMPUx in IER2 register)
AT32UC3C
988

Related parts for AT32UC3C1512C Automotive