This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi I am running a CLA task ( for now an empty task where I am toggling a GPIO and Acknowledging the INTR ).
CLA task is being triggered from EPWM1 Interrupt.
I am able to run the CLA task till 250KHz ( verified by monitoring GPIO on DSO ) successfully.
Any frequency above 250KHZ make my CLA ISR run at a constant frequency which is 228KHZ.
Any reason on why this is happening. I did check all the reference designs from Control Suite. But none of those helped me.
PS: If I generate a CPU1 interrupt for the same EPMW1 and toggle GPIO in it, I can see it toggling at the frequency I programmed it to.
The issue is only with CLA task.
Hi Chandana,
Can you try enabling both CPU1 interrupt(with GPIO toggling) and CLA task(toggling another GPIO) for the same EPWM1 interrupt and check if you are sill facing the issue? This will help to check if the EPWM is the problem or CLA.
Alternatively, you can also do a SW trigger of the CLA from the CPU1 interrupt service routine to see if the CLA is running at the same rate at which the interrupt is occurring.
You can refer to the C2000ware example: cla_ex4_pwm_control to cross check the configurations.
Regards,
Praveen
hi Praveen,
We have tried both the workarounds that you have suggested.
But these didn't solve my problem,
The example code I am working on was taken from C200ware itself.
So could you please tell me what else I need to check or am I missing something?
Chandana,
Is it possible for you to send us a reference code with the modifications that you made on top of the c2000ware example for us to understand the scenario better?
Regards,
Praveen
Chandana,
The configurations looks good. I am doubting that the number of CLA instructions is becoming a bottle neck here as you increase the frequency. Just to confirm the same, can you try replacing the below line in Cla1Task1 function
GPIO_togglePin(17);
with
HWREG(GPIODATA_BASE + GPIO_O_GPATOGGLE) = 0x20000; // Toggle GPIO17 pin
Please let us know if you are able to go above 250Khz with this configuration
Regards,
Praveen
Chandana,
Did you get a chance to try it out? Did it resolve your issue? If so, please mark the answer with "verify answer" button.
Regards,
Praveen
Hi Praveen,
thanks for the reply.
When I directly wrote into register I was able to achieve the frequency I wanted.
Currently I am trying to load the CLA task to 50% of it's execution period, to make sure I am achieving the Frequency I desire.
Will update the results on that soon. I want to keep the thread open till then.
Thanks,
Chandana
I was able to load CLA with 50% of it's execution period.
Thanks for the Support.