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.

LP-CC2652RB: Why the SPI example can work well at different bitRate between master and slave?

Part Number: LP-CC2652RB

Hi Ti:

I am testing the SPI_master and SPI_slave examples with simplelink_cc13x2_26x2_sdk_4_30_00_54.

When I use 20cm lines to connect the master and slave, the result is good, however, when I add the lines to 60cm, there is an error about communication.

After checking, we found that the bitRate config is different: SPI_master's bitRate is 4M/s, and SPI_slave's bitRate is 1M/s, as below:

I am very wondering about the following answer:

1. why do NOT config to the same bitRate in the example?

2. why the example can work well at different bitRate?

Thanks!

  • Hi junde,

    Thanks for notifying us of this inconsistency between SPI TI Driver examples!  I've alerted the respective Software Development Team so that they can correct this during a future SDK update.  SPI is typically quite lenient with bit rate inconsistencies since it is a synchronous protocol with dedicated clock lines, however it is best practice to keep the defined bit rate consistent between devices as it could help improve the connection stability.  You may try further lowering the bit rate if you continue to experience issues with he longer connections, and please make sure to keep the length of each SPI line consistent.

    Regards,
    Ryan

  • The Software Development Team has confirmed that the SPI bitrate is completely dependent on the master settings.  As synchronous communication, the SPI slave will operate at the SPI clock determined by the master so long as it is within the bounds of its own capabilities (up to 4 MHz).

    Regards,
    Ryan

  • But the test result shows: the distance of transmit is farer when the bitRate is matching.

  • Thanks for providing the observations from your setup, I will let the Software Development Team know.

    Regards,
    Ryan