Other Parts Discussed in Thread: C2000WARE
Hi,
I am reading 5 bytes of data through SPI. Engineering data is created from these bytes as:
Data1 = (byte2 << 8) | byte3;
Data2 = (byte4 << 8) | byte5;
When this SPI code runs on CPU1, it reads the data correctly.
But when I move this code to CLA, the Data1 is read correctly, but Data2 is exactly half of what it reads when the code is in SPI (checked for multiple values). Am I missing something here?
I have moved it back-forth between CPU1 and CLA, and the problem is consistent.
SPI clock is 5MHz, Data1 is read correctly, so I assume that means SPI and CLA is configured correctly. I have checked that CLA reads and writes to SPI registers are fine.
CPU is the owner (GPxCSEL register) for the pins used as SCLK, SDI, SDO and Chip Select. Can that be a problem?
CLA task is triggered by EPWM interrupt.
Please let me know if any more information is required.
Thank you.