After many weeks of trying I've been unable to decipher how the SPI on the TMS570LS20216 works. I currently have the USB dev board attached via 3 pin SPI to a PIC dev board, the PIC as master and the TMS570 set as slave.
In the end I need the TMS570 to run independently and respond to ad-hoc requests from the PIC for data from different TMS570 peripherals.
However I currently can not get the two to consistently talk to each other. I have the TMS570 set to 8 bit transmission word, with clock polarity set to high (the two refuse to work entirely when set to low), trigger events are disabled, one shot and CS is not used.
To replicated the intended role of the TMS570, after starting the debugger I have the TMS570 start up the GIO, SPI and global interrupts and then wait in an infinite loop.
At the same time the PIC is started with its own debugger; sets up all the relevant peripherals, loads an array with a 2 byte command, causes an interrupt on the TMS570 (via GIOA0) and finally sends the 2 byte command using a loop and the transfer complete flag.
On the oscilloscope I can see the PIC sending the CLK signal and the 2 byte command but nothing is being returned from the TMS570. I have also used delays on the PIC to ensure the TMS570 is ready to receive/send but with no luck.
In the TRM a comparability mode is mentioned, I've seen it talked about in the forums too, how is this set up in HALCoGen?
What is the meaning of Length in the Transfer Groups, at 0, does this mean the spiIsTransferComplete function will return a 1 as soon as the first transmission word is received, while a 1 will mean after 2 transmission words have been received etc.
As for the read function setup by HALCoGen, I assume it does not need to have the SPI module exercised, it merely copies the data currently in the RX/SPI buffers to the desired array.
Older devices required the SPI buffers to be cleared before any data is sent/read, is this taken care of with the spiSetData, spiTransfer and spiGetData functions provided by HALCoGen?
As a side note, if the help in either HALCoGen or CCS contained any information, it would have been very helpful.

