Condition
- ePWM triggers ADC sampling
- At the end of the ADC ISR, CLA task1 is triggered by SW
- In the CLA, an inline function is called from a header file, and the following PWMs duty cycles are set
- Using up-down counter
- PWM2A
- Using only Comp A
- HIGH on up, LOW on down
- Duty cycle of PWM2A changes every switching cycle.
- PWM3A
- Using Comp A and B
- Comp B is synchronized with Comp A of PWM2A
- Comp A is fixed count which is greater than 0 PWM count number
- In summary, PWM3A is leading over PWM2A. Falling edge of PWM3A coincides to the rising edge of PWM2A
Problem
- Sometimes PWM2A and PWM3A does not coincide. Most of the time, they coincide.
Observation
- Moving the exactly same code to run on the CPU1, the problem disappeared.
Is there anything that I can try to resolve this issue?