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.

TMS320F28069: PWM output abnormally goes high for 1 cycle

Part Number: TMS320F28069


Tool/software:

Hi expert,

Using F28069, we found when the duty cycle changes from non-0% to 0%, the EPWM4B output high lever for 1 PWM cycle. What could be the potential issue?

Configuration: configure the PWM switching period to 38.4K, trigger the PWM interrupt at the zero-crossing point, and configure the PWM interrupt to be triggered once every 2 PWM zero crossing events (EPwm4Regs.ETPS.bit.INTPRD = 2). Execute the control algorithm in the interrupt function and change the PWM comparison value.

Here is the configuration code:

 

              EPwm4Regs.CMPCTL.bit.SHDWAMODE = 0;                           // Compare A Register Shadow mode

              EPwm4Regs.CMPCTL.bit.SHDWBMODE = 0;                           // Compare B Register Shadow mode

              EPwm4Regs.CMPCTL.bit.LOADAMODE = 0;                            // Load on CTR = ZERO

              EPwm4Regs.CMPCTL.bit.LOADBMODE = 0;                            // Load on CTR = ZERO

 

              EPwm4Regs.AQCTLA.all = 0;

              EPwm4Regs.AQCTLB.all = 0;

              EPwm4Regs.AQCTLA.bit.CAU = 2;

              EPwm4Regs.AQCTLA.bit.CAD = 1;

              EPwm4Regs.AQCTLA.bit.PRD = 2;

              EPwm4Regs.AQCTLA.bit.ZRO = 1;

 

 

              EPwm4Regs.AQCTLB.bit.CAU = 2;

              EPwm4Regs.AQCTLB.bit.CAD = 1;

              EPwm4Regs.AQCTLB.bit.PRD = 2;

              EPwm4Regs.AQCTLB.bit.ZRO = 1;

 

              EPwm4Regs.ETSEL.bit.INTEN = 1;                                             // Enable EPWMxINT generation

              EPwm4Regs.ETSEL.bit.INTSEL = 1;                             // Enable CTR = zero event

              EPwm4Regs.ETSEL.bit.SOCAEN = 1;                                         // Enable SOCA pulse

              EPwm4Regs.ETSEL.bit.SOCASEL = 3;                                        // Enable CTR = zero event

              EPwm4Regs.ETPS.bit.INTPRD = 2;               // generate interrupt on INTCNT=01(first event) trigger 1 interrupt every 2 cross zero events

            EPwm4Regs.ETPS.bit.SOCAPRD = 1;                                         // Generate pulse on SOCACNT=01(first event)

Please help with some suggestions, thanks!

Joyce