SPRUJB6B November 2024 – May 2025 AM2612
eCAP module is used to implement a single-channel PWM generator (with 32-bit capabilities) when the eCAP module is not being used for input captures. The counter operates in count-up mode, providing a time-base for asymmetrical pulse width modulation (PWM) waveforms. The CAP1 and CAP2 registers become the active period and compare registers, respectively, while CAP3 and CAP4 registers become the period and compare shadow registers, respectively. Figure 7-303 is a high-level view of both the capture and auxiliary pulse-width modulator (APWM) modes of operation.
Main operating highlights of the APWM section:
Figure 7-304 further describes the output of the eCAP in APWM mode based on the CMP and PRD values.
Figure 7-304 Counter Compare Operation
Figure 7-305 Time-Base Frequency and Period CalculationAPWM Mode Operation – Active High mode
Figure 7-306 APWM Mode Operation (Active High Mode – APWMPOL == 0)The behavior of APWM active high mode (APWMPOL == 0) is as follows:
CMP = 0x00000000, output low for duration of period (0% duty)
CMP = 0x00000001, output high 1 cycle
CMP = 0x00000002, output high 2 cycles
CMP = PERIOD, output high except for 1 cycle (<100% duty)
CMP = PERIOD+1, output high for complete period (100% duty)
CMP > PERIOD+1, output high for complete period
APWM Mode Operation – Active Low mode
Figure 7-307 APWM Mode Operation (Active Low Mode – APWMPOL == 1) DetailsThe behavior of APWM active low mode (APWMPOL == 1) is as follows:
CMP = 0x00000000, output high for duration of period (0% duty)
CMP = 0x00000001, output low 1 cycle
CMP = 0x00000002, output low 2 cycles
CMP = PERIOD, output low except for 1 cycle (<100% duty)
CMP = PERIOD+1, output low for complete period (100% duty)
CMP > PERIOD+1, output low for complete period