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.

F28M36 ePWM7

Dear TI team,

I can not initialze and use the ePWM7-A Module.
In debugging mode (CCS-6), all the ePWM7 registers are still '0' ZERO after the initialisation procedure.
The other PWM Modules 1..6 works as designed for.

Is there any restriction regarding the 'ePWM7'?


Below the initialization procedure.


void c28Pwm7Init( void )
{
    EALLOW;

    GpioCtrlRegs.GPAMUX1.bit.GPIO12  = 1;
    GpioG1CtrlRegs.GPADIR.bit.GPIO12 = 1;
    EDIS;

 
    EPwm7Regs.TBCTL.bit.CTRMODE    = TB_COUNT_UPDOWN;    /* count up and down        */
    EPwm7Regs.TBPRD                = (Uint16)EPWM7_TIMER_TBPRD; /* set timer period        */
    EPwm7Regs.CMPA.half.CMPA       = (Uint16)EPWM7_MIN_CMPA;    /* initial compare A value */
    EPwm7Regs.TBCTL.bit.PHSEN      = TB_DISABLE;         /* disable phase loading    */
    EPwm7Regs.TBPHS.half.TBPHS     = 0x0000;             /* phase is 0               */
    EPwm7Regs.TBCTR                = 0x0000;             /* clr counter              */
    EPwm7Regs.TBCTL.bit.HSPCLKDIV  = TB_DIV1;            /* clock ratio to SYSCLKOUT */
    EPwm7Regs.TBCTL.bit.CLKDIV     = TB_DIV1;
    /* setup shadow register load on ZERO */
    EPwm7Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW;
    EPwm7Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
    EPwm7Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO;
    EPwm7Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;
    /* disable trip zone */
    EALLOW;
    EPwm7Regs.TZCTL.bit.TZA        = TZ_NO_CHANGE;       /* EPwm7A */
    EPwm7Regs.TZCTL.bit.TZB        = TZ_NO_CHANGE;       /* EPwm7B */
    EPwm7Regs.TZCTL.bit.DCAEVT1    = TZ_NO_CHANGE;
    EPwm7Regs.TZCTL.bit.DCAEVT2    = TZ_NO_CHANGE;
    EPwm7Regs.TZCTL.bit.DCBEVT1    = TZ_NO_CHANGE;
    EPwm7Regs.TZCTL.bit.DCBEVT2    = TZ_NO_CHANGE;
    EDIS;
    /* set actions qualifier */
    EPwm7Regs.AQCTLA.bit.CAU       = AQ_SET;
    EPwm7Regs.AQCTLA.bit.CAD       = AQ_CLEAR;
} /* end c28Pwm7Init() */

Just note:

The same code was used with the EVM board and the mounted F28M36 experimental chip. There was no issue.

Regards

WJ

  • Hi WJ,

    WJ said:

    The same code was used with the EVM board and the mounted F28M36 experimental chip. There was no issue.



    Does this mean that this software running on a certain CCS version works on the Experimenter's Kit EVM but not on your custom board?

    The only restriction I am aware of is the one listed in the F28M36x errata document.


    Thank you,
    Brett

  • Hi Brett,

    Yes, this is correct and amazing too.

    Because we use the other PWM Signal lines 1..6 too, with correct functionality.

    With the C28-Application-SW and the CCS-6.0, we are able to set the PWM register ePWM1...ePWM6.
    However all the ePWM7 registers are constantly ZERO and not settable, neither with the C28-Application-SW nor with CCS-6.0.

    To be sure that is not a HW issue, I checked another HW board, but with the same outcome.

    Currenlty I have no idea what kind of issue this could be.

    Are they any protection mechanismen for the ePWM register, especially for ePWM7?

    Thanks

    WJ

  • Hi Brett,

    simple bug: "SysCtrlRegs.PCLKCR1.bit.EPWM7ENCLK = 1;     /* ePWM7   */ "  was not set!

    Many thanks for support.

    Best regards
    WJ

  • Hi WJ,

    Good job!  I am glad you found the root cause.


    Thank you,
    Brett