Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE
Hello, I am using the CLA unit for the control system in my project. I have set up the PWM in an up-down counting mode at a frequency of 100kHz (10us) to trigger both the PWM interrupt and the start of conversion (SOC) of the ADC unit.
Currently, the SOC of the ADC is triggered when the PWM counter is at zero, and each ADC conversion takes 2.5us to complete. PWM ISR2 is triggered when the PWM counter reaches its period value (5us), and PWM ISR triggers the CLA unit.
Now, I have set up both a 100kHz PWM interrupt and a 100kHz CLA unit in the main CPU.
I have a few questions regarding this situation:
-
When the PWM counter reaches its period value and triggers the PWM interrupt, which in turn triggers the CLA unit, do these two units start compiling their code simultaneously, or is there a delay in the interrupt within the PWM ISR? Can I understand this?
-
Should I reset the PWM ISR flag within the PWM interrupt or within the CLA unit?
-
For the control system operations I want to perform in the CLA unit, I need specific ADC readings. However, these readings are also needed for calculations in the main CPU section. Do I need separate channels to read the ADC values for both the CLA unit and the CPU unit, or can I use the ADC data read by the CLA unit in the main CPU, and vice versa? Can both units read from the same memory simultaneously? Is there a risk of conflict?
-
If I obtain a result with certain calculations within the PWM interrupt, how does transferring this result to the CLA unit affect my system? For example, if I send the sinusoidal signal obtained from PLL calculations in the PWM ISR function to the CLA unit, how does it affect my operations? Can the result from PLL be immediately written to the CLA unit? How does the parallel operation feature of CLA and CPU work here? Or should I perform the PLL operation within the CLA unit as well?


