Part Number: LAUNCHXL-F28377S
Hi all!
I am trying to generate a high-frequency/low duty-cycle signal using the EPWM-Module of the F28377S evaluation board and i am measuring weird glitches once my signal period is less than ~900ns.
This is my configuration for the EPWM:
ClkCfgRegs.PERCLKDIVSEL.bit.EPWMCLKDIV = 0x1; CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 0x0; EPwm6Regs.TBCTL.bit.CTRMODE = 0; // Count up EPwm6Regs.TBPRD = 130; EPwm6Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN; EPwm6Regs.CMPA.bit.CMPA = 4; EPwm6Regs.AQCTLA.bit.CAU = AQ_SET; // switch to HIGH EPwm6Regs.CMPB.bit.CMPB = 8; EPwm6Regs.AQCTLA.bit.CBU = AQ_CLEAR; // switch back to LOW CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 0x1;
Furthermore the Clock is cofigured to 200MHz -3% as described in spruhx5c-TRM section 2.7.6.4.
While leaving EPwm6Regs.TBPRD >= 130 everything works fine as shown in the image below:
However once i change TBPRD=120 (or 860ms) weird glitches start to appear:
After some testing i noticed the following things:
- The spikes only appear below a certain physical time (<900ns). Dividing the clock speed and TBPRD by 2 leads to the same result.
- They disappear at TBPRD = 50 and TBPRD = 25 (most likely because they overlap with the signal)
- changing the width of the needle pulse (EPwm6Regs.CMPB.bit.CMPB) has no effect.
So i am wondering if this is a limitation by the hardware or if i am missing something else..?