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.

TMS320F2800157-Q1: SPI Polarity and Phase

Part Number: TMS320F2800157-Q1
Other Parts Discussed in Thread: C2000WARE

Tool/software:

I am working on SPI protocol to establish communication with SMP581 sensor and ADS131M03IRUKR sensors. Both works with POL=0 and PHA = 1 mode. I have written the corresponding values in the register for the POL=0 and PHA=1 configuration and I could see from the pin out using Logic Analyzer that values are transmitted in POL =0 and PHA =0 configuration. Similarly, if I set POL=0 and PHA=0 is microcntroller the bus is reflecting POL = 0 and PHA = 1. I could see this behavior across other microcontrollers too. Can you support me to solve this issue?

  • Hi Ruthrapathy,

    Could you clarify what you are asking? Since the phase is different in both of those modes, both the MCU and sensor need to be configured to be in the same mode. Note that the names are different across companies, so make sure the diagrams match.

    Best Regards,

    Aishwarya

  • Straight forward question is, if I configure TMS320F2800157-Q1 to transmit data in POL = 0 and PHA = 1 mode, the controller is transmitting data in POL = 0 and PHA = 0 mode which is incorrect. Similarly, if I configure the controller to transmit in POL = 0 and PHA = 0, it is transmitting data in POL = 0 and PHA = 1 which is also incorrect. Why is this behavior?

  • Ruthrapathy,

    Configure the SPI in loopback mode and test it. If it doesn't work, do the following:

    Run / scope any C2000Ware SPI example (I would suggest Examples #3 or #4) for a reference for how the SPI should be configured to see the right waveforms. Since the data is correct and waveform is wrong, there is an incorrect software configuration of one or more of the pins most likely. 

    Best Regards,

    Aishwarya