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.

CC3501E: Need clarification over SPI driver example code

Part Number: CC3501E

Hi Forum,

 

I am referring to the example spiperipheral which is provided in SDK simplelink_wifi_sdk_10_10_00_18, i want ONLY the slave functionality, i went through example code which it seems acting as both controller and peripheral. I tried to go through APIs of SPI driver couldn't find any relavent APIs that will just enable recepetion of data in peripheral mode. Furthermore, i may need ONLY controller which does only transmission in future for different project.

My seconds query is, can we configure the SPI(controller or peripheral) for arbitrary frequency value ( i am looking for the CLK frequency resolution)

 

Regards

Vignesh

  • Hi Vignesh,

    To run this example successfully, another SimpleLink device running the spicontroller example is required. The spiperipheral example is just sending data to and receiving data from a controller, it is not acting as a controller itself. The device has the functionality to operate in either spi peripheral or controller mode without acting as the other role.

    My seconds query is, can we configure the SPI(controller or peripheral) for arbitrary frequency value ( i am looking for the CLK frequency resolution)

    Please see the following section from our TRM

    Best Regards,

    Josh Prushing

  • Hi Josh,

    We tested using an ST device as the SPI controller and the SimpleLink device as the SPI peripheral. However, the peripheral was unable to receive the data.

    We verified using a logic analyzer that the SPI clock and data signals are present on the SPI bus.

    Regards
    vignesh s

  • Hi Vignesh,

    What CLK & SPI frequency are you using for both ST and CC35 device? 

    Best Regards,

    Josh Prushing

  • Hi Josh,

    The SPI frequency is set to 1 MHz. We are not sure how to verify the clock configuration, and we have not modified anything related to the system clock settings.

    We monitored the SPI lines using a logic analyzer and observed that the master is transmitting data correctly, and the peripheral is also driving data on the bus. After successful transfer the callback is getting triggered However, the rxBuffer is always getting filled with zeros. 


    Regards
    Vignesh S

  • Hi Vignesh,

    Thanks for the additional info here. I will respond by end of day tomorrow with some additional information.

    Best Regards,

    Josh Prushing

  • Hi Josh,

    The SPI transfer is working. The issue was with mode of SPI, for some strange reason when both master and slave are configure in mode_1, the data not getting into the rxbuffer. when we changed mode to mode_0, we found it working.

    Thanks for your support.

    Regards

    Vignesh S

  • Hi Vignesh,

    Happy to hear! Let me know if you have any additional questions about the SPI example.

    Best Regards,

    Josh Prushing