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.

LAUNCHXL-F28379D: Register to read SYSCLKOUT

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Hi,

I would like to check the SYSCLKOUT that is being used. Is there a register or any other component where the value can be seen.

I am trying to keep it to 200 MHz.

Could you help me with the lines in InitSysCtrl(); functions of C2000Ware that might be modifying my clock.

As per my understanding below line sets it to 200MHz,

    InitSysPll(XTAL_OSC,IMULT_40,FMULT_0,PLLCLK_BY_2);

I have also written     SysCtl_setEPWMClockDivider(SYSCTL_EPWMCLK_DIV_1); in my EPWM initialization.

However, my EPWM output is not as expected.

Is there any other code as part of system initialization that might be altering EPWM clock? I have set the clock.lo to 200MHz in app.cfg too as I am using SYS/BIOS

Regards,

Rashmitha

  • Rashmitha,

    You can route the SYSCLK to the XCLKOUT pin, if you want to physically verify the value. Refer to section 3.7.4 in SPRUHM8I on how to do this.

      InitSysPll(XTAL_OSC,IMULT_40,FMULT_0,PLLCLK_BY_2);

    You are correct that the above line sets the SYSCLK to 200 MHz (assuming your input clock is 10 MHz).

    However, my EPWM output is not as expected.

    Is your ePWM output correct when you don't use SYS/BIOS?

  • Hi Rashmitha,

    I am trying to keep it to 200 MHz.

    If you take a look at the 'device.h' file you will notice that there are two different configurations for the clock settings based on if you are using a LaunchPad or ControlCARD.

    Below is a snippet:

    Could you please try defining "_LAUNCHXL_F28379D" as a predefine symbol since you are using a launchPad?

    You can access the Predefined symbols list by right clicking on your project and going to Project Properties, Navigating to Build » C2000 Compiler » Advanced Options » Predefined Symbols. On this view you can add the predefine symbol.

    I have also written     SysCtl_setEPWMClockDivider(SYSCTL_EPWMCLK_DIV_1); in my EPWM initialization

    The ePWM clock has a max frequency of 100MHz, this is outlined as part of the datasheet specs. Therefore, I would recommend doing a /2 (default), instead of /1. 

    Best Regards,

    Marlyn