I am working on an embedded project where the target hardware is a Texas Instruments C2000 F28379D MCU. I would like to utilize the CLA (on CPU1), but I experienced an issue that I cannot solve on my own. I am using Data Stores for the communication between the CLA and CPU. The data stores are allocated to the appropriate memory sections (CpuToClaMsgRAM and ClaToCpuMsgRAM).
My trigger sequence is the following: a PWM interrupt triggers an ADC conversion, then the ADC EOC triggers the CLA Task 1. I verify that the CLA is running (and measuring the speed) by toggling two GPIOs, one in the PWM interrupt, the other in the CLA interrupt.
Please note that the following snippet runs properly. I simplified the circuit and focused on the section where the code goes wrong.
This way, having the Constant block (sample time -1) to drive the input of the Gain block, the CLA is running as expected.
However, I would like for a variable to take the place of the Constant block, hence I use a Data Store Read Block. The data store it is linked to resides in the CpuToClaMsgRAM. The picture below shows the change.
Now, however, the CLA is not running. The GPIO toggled in the CLA interrupt is contant high (instead of toggling). Please note that the Data Store variable type is a custom Bus consisting of 3 single signals. The other two signals can be connected to their appropriate places and the CLA runs fine. If I connect either of the 3 signals to the Gain block pictured, the CLA does not execute.
Please help solve this problem with the CLA. I am happy to provide additional information if needed.
EDIT: Somehow the problem is the Sine block. If I remove the sine block, the CLA runs.