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.

SPI Communication with SmartRF06EB and two external devices

Other Parts Discussed in Thread: CC2538

I have three devices I'd like to connect using SPI: 1 SmartRF06EB, 1 MSP430 and 1 Skyetek Nova RFID interrogator.

SmartRF06EB would be the master and the other devices would be slaves. Even though there's a TI example for using SPI with this board, the problem is that several of its built-in devices (LCD, accelerometer, etc.) uses the SPI bus as well. 

Is there a way to use the same bus to connect external devices? Finding MISO, MOSI and CLK pins wasn't an issue, but how can I get CS pins for selecting external devices? And if there's anyway I can get those selection pins, how are they addressed in the code? I'd like to stress that keeping LCD functionality while communicating with external devices is required.

  • You can refer to lcd example in cc2538 foundation firmware. Check how it implement BSP_LCD_CS in lcdInit(). Check  LCD_SPI_BEGIN() and LCD_SPI_END() to see how it operate CS before and after SPI command.

  • I checked not only that but also the SPI Master example of driverlib on Foundation Firmware on how to use SSIEnableSSIDataPutSSIDataGet, etc. functions.

    LCD is working fine since I'm using BSP functions for it. The problems is how to extend SPI bus communication to other devices that are external to the board. I'm afraid simply wiring MISO, MOSI and CLK, without an extra and separate CS signal, would jam with LCD operation.

  • MISO, MOSI and CLK can be shared by SPI slave but you have to use different CS for different slave. That's why I suggest you to have a look at CS related functions.

  • I checked the examples and actually found out the functions you mentioned and how not only CS pin for LCD (PB5) but also CS pin for accelerometer (PD5) is asserted and deasserted in order to communicate. It doesn't seem to me, though, there are available and easily wire-able pins I could use as, let say, CS_MSP430 and CS_RFID.

    What I'm trying to say is that I'd like to keep CS_LCD internally wired, but use those two other CS signal for external devices using SmartRF06EB.

  • You have to find another unused GPIO pins, one is for CS_MSP430 and another for CS_RFID.