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.

CCS/TMS570LS0714: SPI Master Slave Communication

Part Number: TMS570LS0714
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

I have configured SPi port 3 as the master inorder to receive data from a slave. With Oscilloscope I'm able to observe the CLOCK, CHIPSELECT , MOSI and even MISO signal. But my buffer when i put breakpoint and check through CCS is not reading any data. Can you guide me through the Master-Slave Configuration that needs to be done in HalCoGen, and what function that needs to be called in CCS. so that i can cross check with my code. 

Thank you,

  • Hi Ermine,

    The HALCoGen has an example for SPI master-slave communication. HALOCGen-->Help-->Help Topics-->examples-->example_spi_Master_Slave.c

  • Hy QJ Wang, 

    I have done that, the trouble is I received the SIMO signal from LTC 6812 which i use to read voltage of cells of a battery. But I'm not receiving any data when i put a breakpoint in the function call of spiSendandReceive function ( in CCS). Could you please help what might have went wrong in calling the spisendandreceive function and why i am not able to read the miso signal in CCS. Any help would be appreciated. 

    Thanks

     

  • Hello,

    LTC 6812 is a SPI slave, and doesn't generate SPI clock. For reading data from LTC6812, the SPI master needs to send command, and dummy data to LTC68x. The size of the dummy data should be the size of returned data from LTC68x's.

    Please refer to LTC68x datasheet for the details of the communication protocol.

  • Hi Wang,

    yes, SPI doesn't generate clock. I'll check the function parameters.

    Regards,