This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28377S: EPWM SWITCHING FREQUENCY

Part Number: TMS320F28377S


Tool/software: Code Composer Studio

Hi guys.

I saw a bunch of questions and answers, but none of the answer what is happening here.

In the 28335 i always calculeted the  EPWM_TIMER_TBPRD like :

EPWM_TIMER_TBPRD = 150 Mhz / (2 * SwitchingFreq)  For exemple (SwitchingFreq = 12Khz) =  150 Mhz / (2 * 12k) = 6250    for UpDown 

But for the 28377 i saw that the Epwm for it is half of the clock - Meaning 100 Mhz, thus  EPWM_TIMER_TBPRD should be like:

EPWM_TIMER_TBPRD = 100 Mhz / (2 * SwitchingFreq)  For exemple (SwitchingFreq = 10Khz) =  100 Mhz / (2 * 10k) = 5000    for UpDown 

however i need to set 2500 to get 10kHz.

and i am using the Epwm configured like this:

EPwm6Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1; 
EPwm6Regs.TBCTL.bit.CLKDIV = TB_DIV1;

Thanks guys !

  • Hi,

    100MHz PWM frq is based on 200MHz SYSCLK. Have you checked that SYSCLK is 200MHz in your setup. If SYSCLK is 100MHz then PWM frq will be 50MHz only. You can check the XCLKOUT frq to see what is SYSCLK or calculate the PLL frq based on PLL configuration (and clock setting).

    Regards,

    Vivek Singh