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/TMS320F28379D: Verify register settings for PWM operation

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

Hello,

The application that we are working upon requires the clock to operate at 200 MHz.

We have incorporated the following code in CCS main loop:

  EALLOW;
//Setting for 200MHz of system frequency.//
    ClkCfgRegs.CLKSRCCTL1.bit.OSCCLKSRCSEL = 0;
    ClkCfgRegs.SYSPLLMULT.bit.IMULT = 40;
    ClkCfgRegs.SYSPLLMULT.bit.FMULT = 0;
    ClkCfgRegs.SYSCLKDIVSEL.bit.PLLSYSCLKDIV = 1;
    ClkCfgRegs.SYSPLLCTL1.bit.PLLCLKEN = 1;
    ClkCfgRegs.PERCLKDIVSEL.bit.EPWMCLKDIV = 0;
   EDIS;

Also, the sysctrl.c file is modified for 200 M Hz as:

#ifdef _LAUNCHXL_F28379D
InitSysPll(XTAL_OSC,IMULT_40,FMULT_0,PLLCLK_BY_2);
#else
InitSysPll(XTAL_OSC, IMULT_20, FMULT_0, PLLCLK_BY_2);

We require the EPWM frequency as 50 kHz.

The TBPRD value is set to 2000 based on 200M Hz clock.

But the frequency obtained is 43.94 KHz and not 50 kHz.

Are there any additional settings that are to be done?

Any additions to code?