Hi,
I would like to know how to stop a CLA task and to re-enable it properly. It's critical because in that task, I compute the control loop of my converter.
Here is my application:
ePWM1 generates a pulse on SOCA
This pulse triggers SOC0
EOC0 triggers ADCAINT1
ADCAINT1 triggers CLA Task 1
Problem: when a special event occurs (as a protection for example), I want to stop computing task 1. Untill know, I used the bit SOCAEN of ETSEL register from ePwm1Regs to stop the pulse that triggers SOC0.
But when I re-enable it, CLA task 1 is first computed asynchronously with ePWM1 module => and after this strange phenomenon it goes back to normal operation.
You can see it below, the blue curve shows task 1 computation by toggling an I/O at the beginning and at the end of task 1. And the other curve is ePWM1 output. I don't expect the first asynchronous blue pule.
So is there a way to do it properly ? I have the same question for CPU interrupt, what's the proper way to stop an interrupt and to re-enable it ?
Thank you,
Adrien