Other Parts Discussed in Thread: TMS320F28069,
Hi Team,
We have requirement to generate fixed number of PWM cycles periodically.
Requirement :
We need to start the PWM signal in the ECAP1 interrupt and count the number cycles with DMA by writing to PWM registers on every period overflow and generate the DMA interrupt at the end of transfer (93 cycles) and in the DMA ISR disable the PWM and repeat it on the next ECAP interrupt.
Implementation :
PWM_Initialization
{
....
....
//Forced to low
EPwm2Regs.AQCSFRC.bit.CSFA = 0x01;
EPwm2Regs.AQCSFRC.bit.CSFB = 0x01;
....
....
}
ECAP1_ISR {
.....
.....
//Forcing is disabled
EPwm2Regs.AQCSFRC.bit.CSFA = 0x03;
EPwm2Regs.AQCSFRC.bit.CSFB = 0x03;
....
....
}
DMA_INT //This is served after 93 cycles of PWM
{
.....
.....
//Again forced to low
EPwm2Regs.AQCSFRC.bit.CSFA = 0x01;
EPwm2Regs.AQCSFRC.bit.CSFB = 0x01;
....
}
We are observing delay in the start of the PWM and delay in stopping the PWM signal? I have posted the picture of delay at the start.
** In the picture, PWM2 and PWM3 are forced to low and PWM4 is not, PWM2 -> PWM3 -> PWM4 are synchronized.
Please suggest a way to remove this 2 cycles delay at the start and end.
Thanks,
Ajay



