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.
Dear team:
Are there any differences in the configuration of PWM between the two chips except the two registers of EPWMSYNCINSEL and EPWMSYNCOUTEN?
My customer applied the code of F280049 to F280025 and found that the chip can work normally. But the EPWM of F280025 has no output signal, the carrier signal and the input signal of the comparator have, but there is no output.
GpioCtrlRegs.GPAPUD.bit.GPIO0 = 1; GpioCtrlRegs.GPAGMUX1.bit.GPIO0 = 0; GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; EPwm1Regs.TBPRD = C_INIT_PRD; EPwm1Regs.CMPB.bit.CMPB = EPwm1Regs.TBPRD - gADC.DelayApply; EPwm1Regs.TBPHS.all = 0; EPwm1Regs.TBCTL.all = 0xE012; EPwm1Regs.TBCTL.bit.HSPCLKDIV = PWM_CLK_DIV; EPwm1Regs.TBCTL.bit.PHSDIR = TB_UP; EPwm1Regs.CMPCTL.all = 0x0100; EPwm1Regs.CMPA.bit.CMPA = C_INIT_PRD/2; EPwm1Regs.AQCTLA.all = 0x0060; EPwm1Regs.AQSFRC.all = 0x0; EPwm1Regs.AQCSFRC.all = 0x0; EPwm1Regs.DBCTL.all = 0x000B; EPwm1Regs.DBFED.bit.DBFED = C_MAX_DB; EPwm1Regs.DBRED.bit.DBRED = C_MAX_DB; EPwm1Regs.EPWMSYNCINSEL.bit.SEL = 0x01; EPwm1Regs.EPWMSYNCOUTEN.bit.ZEROEN = 1; EPwm1Regs.TZDCSEL.all = 0x0C3; EPwm1Regs.DCTRIPSEL.bit.DCALCOMPSEL =3; EPwm1Regs.DCTRIPSEL.bit.DCBLCOMPSEL =4; EPwm1Regs.DCALTRIPSEL.bit.TRIPINPUT4 =1;//trip4 EPwm1Regs.DCBLTRIPSEL.bit.TRIPINPUT5 =1;//trip5 EPwm1Regs.DCACTL.all = 0x0002; EPwm1Regs.DCBCTL.all = 0x0002; //Set the Trip-zone (TZ) Module EPwm1Regs.TZCLR.all = 0x02F; EPwm1Regs.TZSEL.bit.OSHT1 = 1; // OSHT1:TZ1; //内部比较器1 2作为触发EPWMXA的逐波限流(ost)触发源 EPwm1Regs.TZSEL.bit.DCAEVT1 = 1;//Enable DCAEVT1 as a ost trip source for this ePWM module EPwm1Regs.TZSEL.bit.DCBEVT1 = 1;//Enable DCBEVT1 as a ost trip source for this ePWM module EPwm1Regs.TZCTL.bit.TZA = 2;//Force EPWMxA to a low state EPwm1Regs.TZCTL.bit.TZB = 2;//Force EPWMxA to a low state EPwm1Regs.TZCTL.bit.DCAEVT1 = 2;//Force EPWMxA to a low state EPwm1Regs.TZCTL.bit.DCBEVT1 = 2;//Force EPWMxA to a low state EPwm1Regs.TZEINT.bit.OST = 1; EPwm1Regs.TZEINT.bit.DCAEVT1 = 1; EPwm1Regs.TZEINT.bit.DCBEVT1 = 1; //Set the Event-trigger (ET) Module EPwm1Regs.ETCLR.bit.INT = 1; EPwm1Regs.ETSEL.all = 0x0F09; EPwm1Regs.ETPS.all = 0x0101;
Best regards
Hi Green,
Can you check F28004x<>F28002x Migration document (SPRACK2) on Table 3 if ePWM register differences were taken into account when migrating the code?
Thanks,
Joseph