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/TMS320F28027: How to add CPUTimer.out file?

Part Number: TMS320F28027
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

hello, I am new to microcontrollers.

I tried to execute epwm program using f28027.

I am getting no errors and warnings but no output.

when I compared with other PWM program, I found that a file namely "CPU Timer.out - [c2000/le]" is missing in Binaries folder under my program in workspace

Can you please help me how to tackle this type of issues?

  • Madhuri,

    Is this an example project from controlSUITE you are trying to build? If so, which one?
    The name of the .out file is usually the same as the project name. Is the .out file not getting generated for this PWM project? Did you check the CCS build console closely to see if there are any build errors?

  • You may want to check out
    processors.wiki.ti.com/.../C2000_Archived_Workshops
    for the archived workshops for the F28027. It will help get you up to speed!
  • hello,

    this is the program which I have written for generation of simple epwm.

     

    #include "DSP28x_Project.h"

     

    typedef struct

    {

           volatile struct EPWM_REGS *EPwmRegHandle;

           Uint16 EPwm_CMPA_Direction;

           Uint16 EPwm_CMPB_Direction;

           Uint16 EPwmTimerIntCount;

           Uint16 EPwmMaxCMPA;

           Uint16 EPwmMinCMPA;

           Uint16 EPwMaxCMPB;

           Uint16 EPwMinCMPB;

    }EPWM_INFO;

     

    void InitEPwm1Example(void);

    interrupt void epwm1_isr(void);

     

    EPWM_INFO epwm1_info;

    #define EPWM1_TIMER_TBPRD 300 // Period register

    #define EPWM1_MAX_CMPA     1950

    #define EPWM1_MIN_CMPA       50

    #define EPWM1_MAX_CMPB     1950

    #define EPWM1_MIN_CMPB       50

     

    #define EPWM_CMP_UP   1

    #define EPWM_CMP_DOWN 0

     

    void main(void)

    {

           InitSysCtrl();

           InitEPwm1Gpio();

           DINT;

           InitPieCtrl();

           IER = 0x0000;

           IFR = 0x0000;

           InitPieVectTable();

     

           EALLOW;

           PieVectTable.EPWM1_INT = &epwm1_isr;

           EDIS;

     

           EALLOW;

           SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;

           EDIS;

     

           InitEPwm1Example();

     

           EALLOW;

           SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1;

           EDIS;

     

           IER |= M_INT3;

     

           PieCtrlRegs.PIEIER3.bit.INTx1 = 1;

     

           EINT;

           ERTM;

     

           for(;;)

           {

                  asm("         NOP");

           }

     

    }

     

    interrupt void epwm1_isr(void)

    {

           EPwm1Regs.ETCLR.bit.INT = 1;

           PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;

    }

     

    void InitEPwm1Example()

    {

           EPwm1Regs.TBPRD = EPWM1_TIMER_TBPRD;

           EPwm1Regs.TBPHS.half.TBPHS = 0x0000;

           EPwm1Regs.TBPRD = 0x0000;

     

           EPwm1Regs.CMPA.half.CMPA = 100;

           EPwm1Regs.CMPB = 200;

     

           EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN;

           EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE;

           EPwm1Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1;

           EPwm1Regs.TBCTL.bit.CLKDIV = TB_DIV1;

     

           EPwm1Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW;

           EPwm1Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;

           EPwm1Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO;

           EPwm1Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;

          

           EPwm1Regs.AQCTLA.bit.CAU = AQ_SET;

           EPwm1Regs.AQCTLA.bit.CAD = AQ_CLEAR;

           EPwm1Regs.AQCTLB.bit.CBU = AQ_CLEAR;

           EPwm1Regs.AQCTLB.bit.CBD = AQ_SET;V

    }

     

     

  • this is how my workspace looks like

  •  this is how the workspace of the working program looks like

  • you can see the only difference is CPU Timer.out file
  • Madhuri,

    The Binaries folder in the Project Explorer view is a "virtual" folder that, by default, references the executable file(s) in your active build configuration sub-folder (ex, 'Debug'). Usually the name of the .out file is the same name as the project (but it can be customized, of course).

    From your screenshots, it seems that the 'PWM UP DOWN" project has a CPU Timer.out file in addition to the .out file generated by the project build. Perhaps this file was copied over into the "Debug" sub-folder or perhaps it just remained there from a previous build, but it should not impact execution of your project.

    Please check out the C2000 Workshops referenced by Todd, it will definitely help you get up to speed. In addition, the following references (which are more CCS focused) should help as well:

    http://processors.wiki.ti.com/index.php/Projects_and_Build_Handbook_for_CCS

    http://processors.wiki.ti.com/index.php/CCS_Fundamentals_Workshop#F28027

  • hello,

    actually, my code is not giving any errors. I tried all the ways I could. but still its not working. PWMUPDOWN was same code, it is executing properly and giving me output. the same code in PWM0URS is not working. I am not understanding why. the only difference I could find is CPU Timer.out file is not getting created.

    Is there any other ways to check why that particular file is not getting created during debug process. Please help me.

  • Madhuri Depuru84 said:
    the only difference I could find is CPU Timer.out file is not getting created.

    The build of a project results in a single executable (.out) file. In the case of PWMOURS that would be PWMOURS.out (unless the output file name is specified to be something else).

    I don't know and cannot explain why CPU Timer.out is also there in the other project's \Debug directory and what its purpose is. You may want to check with the creators of that original project, but from a tools perspective, CCS will only generate one .out when building a project.

  • hello, I got the output by changing optimization settings.
    please can you help me find a pdf or any source to understand these optimization settings?

    Thank you