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.
1. Can CLA operated once every 300 nano seconds (3.333MHz) from CPU?
2. If I use only one CLA task within while(1) loop, Can I come out of the loop if required?
Hi Ganeshpandi,
Regarding your question 1, you can configure a Timer to run at the required frequency and use the Timer CLA peripheral trigger(TINTx) to trigger the CLA task.
Regarding your question 2, can you please elaborate on it? Are you trying to trigger a CLA task within a while(1) loop?(A code snippet will help us to understand the question little better)
Regards,
Praveen
I meant that CLA task uses while loop as shown below. In such cases I want only one CLA task permanently. and my question is that If I made that task permanently within a while(1) loop, Is there any option to set my program to come out of loop if required ?
interrupt void Cla1Task1(void) { while(1) { } }
Ganeshpandi,
If I understand your requirement, you want to execute a code inside CLA Task as long as a condition is not met. If so, you can actually keep the condition to exit the task inside checking condition of the while right? Something like,
interrupt void Cla1Task1(void) { while( <check if exit condition has not reached> ) { } }
Ganeshapandi,
If the above answer has resolved your query. please click "verify answer".
Thanks
Regards,
Praveen
Dear Praveen,
Thank you for your response. I would like to use CLA at every 300ns (It is my Desired CLA task excecution time). I understood from your last reply that it is possible through Timer CLA peripheral trigger. Please advice me whether the Timer is CPU timer or Any other peripheral timers? If you have configuration example please forward to me.
Thank you Praveen.
Ganeshapandi,
The timer I had mentioned is the CPU timer(you are free to use the EPWM timer as well, but timer seems to fit your requirement as you just have to count 300ns). There is an ADC CLA trigger example which you can modify to include timer: cla_adc_fir32.
For timer configurations, you can refer to the timed_led_blink example. Instead of enabling the interrupt from Timer, you will have to configure the CLA task trigger.
Regards,
Praveen