Datasheet

Figure 51-26. Event Line Generation Waveform (Example)
CPRD(PWM_CPRD0)
CDTY(PWM_CDTY0)
PWM_CCNTx
Waveform OC2
CDTY(PWM_CDTY1)
CDTY(PWM_CDTY2)
Waveform OC1
Waveform OC0
CV (PWM_CMPV0)
CV (PWM_CMPV1)
Comparison
Unit 0 Output
PWM_CMPM0.CEN = 1
Comparison
Unit 1 Output
PWM_CMPM0.CEN = 1
Event Line 0
(trigger event for ADC)
PWM_ELMR0.CSEL0 = 1
PWM_ELMR0.CSEL1 = 1
configurable delay
PWM_CMPV0.CV
configurable delay
PWM_CMPV1.CV
ADC conversion
ADC conversion
51.6.5 PWM External Trigger Mode
The PWM channels 1 and 2 can be configured to use an external trigger for generating specific PWM signals. The
external trigger source can be selected through the bit TRGSRC of the PWM External T
rigger Register (see the table
below).
Table 51-5. External Event Source Selection
Channel Trigger Source Selection Trigger Source
1 PWM_ETRG1.TRGSRC = 0 From PWMEXTRG1 input
PWM_ETRG1.TRGSRC = 1 From Analog Comparator Controller
2 PWM_ETRG2.TRGSRC = 0 From PWMEXTRG2 input
PWM_ETRG2.TRGSRC = 1 From Analog Comparator Controller
Each external trigger source can be filtered by writing a one to the TRGFILT bit in the corresponding PWM External
T
rigger Register (PWM_ETRGx).
Each time an external trigger event is detected, the corresponding PWM channel counter value is stored in the
MAXCNT field of the PWM_ETRGx register if it is greater than the previously stored value. Reading the
PWM_ETRGx register will clear the MAXCNT value.
Three different modes are available for channels 1 and 2 depending on the value of the TRGMODE field of the
PWM_ETRGx register:
TRGMODE = 1: External PWM Reset Mode
TRGMODE = 2: External PWM Start Mode
TRGMODE = 3: Cycle-By-Cycle Duty Mode
See the following sections.
This feature is disabled when TRGMODE = 0.
This feature should only be enabled if the corresponding channel is left-aligned (CALG = 0 in PWM Channel Mode
Register of channel 1 or 2) and not managed as a synchronous channel (SYNCx = 0 in PWM Sync Channels Mode
SAM E70/S70/V70/V71 Family
Pulse W
idth Modulation Controller (PWM)
© 2019 Microchip T
echnology Inc.
Datasheet
DS60001527D-page 1576