Hello All,
I am using F28335 for firing pulses of an inverter. The inverter switching frequency is 100khz. I have some control computation that takes around 60-70 us and the ewpm interrupt comes at every 10 us. I asked something regarding that in an earlier post. Two solutions were given. I have some questions regarding them.
1)I was told to do handshaking between these two parts of code.i was told to set a flag when the computation completes, and then wrap my ePWM ISR in an "if" statement that checks if your flag is set, otherwise it just returns to your application code.
But i found that once the pwm interrupt is enabled, the interrupt is executed even it is within an if statement and the condition given is not true.
2) Also i was told to use two separate timers. One for CPU (60us) and one for epwm (10us). The cpu timer has higher priority than the epwm timer. So, how to sync the clocks of both the timers together ? Also what when the 6th epwm interrupt arrives with the 1st CPU interrupt,will the control code get executed?
3) Also if I write my control code in an infinite ''for'' loop, then set set EPwm1Regs.CMPA.half.CMPA=duty ( duty is calculated from the control code) without using the epwm interrupt, will that work?
Regards