SPRADG4A January 2024 – April 2024
PWMs are one of the core parts of the software configuration for the inverter. The PWM module of AM263x inherited features from TI classic C28 controllers. A total of six PWM channels are needed to control the inverter output.
Two EPWM instances are created for controlling the two legs of the HV side: PSFB_FB_PWM1, PSFB_FB_PWM2. PSFB_SR_PWM is created to control the SR switches of the LV side. PSFB_ADC_OVERSAMPLING_PWM is created to generate EPWMSYNCPER signal form CMPSS module. The EPWM peripheral clock is running at 200MHz. PSFB_FB_PWM1, PSFB_FB_PWM2 and PSFB_SR_PWM are configured for 100kHz frequency at Up-Down Count mode. PSFB_ADC_OVERSAMPLING_PWM is configured for 200kHz frequency at Up Count mode.
From Equation 1, Time base Period of PSFB_FB_PWM1, PSFB_FB_PWM2, PSFB_SR_PWM is 500, when the High-Speed Clock divider is 1 and Time Base Clock divider. From Equation 2, the Time base Period of PSFB_ADC_OVERSAMPLING_PWM is also 500, when the High-Speed Clock divider is 1 and Time Base Clock divider. Only PWM instance assignment was done using SysConfig. PSFB_FB_PWM1, PSFB_FB_PWM2. PSFB_SR_PWM and PSFB_ADC_OVERSAMPLING_PWM have been assigned to EPWM4, EPWM3, EPWM5 and EPWM2, respectively. All the other PWM related configurations as discussed in Section 4.3.1 and Section 4.3.3 are done in PSFB_HAL_setupPwms() inside main().