2 Replies Latest reply on Mar 17, 2015 4:57 PM by KurtE

    SPI Chip Select

    Michinge

      Hello everybody,

       

      i'm working on a project where i need to comunicate with multiple devices with the Intel Edison using SPI. I know that using the SSP5 (as reported on the mini breakout board) is possible to use two Chip Select. Does anybody knows if it is possible to use a general GPIO as CS in order to increase the number of devices connectable to the Edison?

       

      Thanks in advance,

       

      Michele

        • 1. Re: SPI Chip Select
          CMata_Intel

          Hi Michinge

           

          Yes, you can set a GPIO to interact as a CS pin. I suggest you to look at the Edison's Hardware Guides to check the pin's information and distribution.

          Arduino Expansion Board

          Mini breakout board

          Compute Module

           

          Regards;

          CMata

          • 2. Re: SPI Chip Select
            KurtE

            I have hacked my way with MRAA, where I disable the hardware CS pin and then control the appropriate CS pin for the device I wish to control.  I am also doing so as currently there is not much control over when the CS pin is asserted or deasserted in the system and some of my devices (Adafruit 2.8" TFT display), detect when the CS pin is deasserted and then end a command.  Especially commands where we are asking the device for information.

             

            Note: I am still green when digging into the kernel code, but my impression is that the SPIDEV CS pin appears to be a standard GPIO pin that the kernel is driving.  I have asked but so far I have not seen any answers if one could add additional CS pins like this to the kernel and if so, what all would I need to change.  On the ODroid C1, for example it looked like I could simply update the device tree file, say there are now 3 instead of 2 and which IO pin I added and it should work...  Not sure what all I would need to change here.

             

            Kurt