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.

Using SPI with a beagle bone black

Other Parts Discussed in Thread: SN74CB3Q3251

Hi,

I have a need to drive multiple peripherals with the SPI interface but there is only one CS pin. Before I launch off and hack a fix into place I'm hoping that someone may know a conventional (aka elegant) method that may apply in this case. My initial thought is some external logic that will use a couple of I/O pins with an encoder to steer the one CS pin to the intended target peripheral and to set the encoder bits prior to the transaction. I'm hoping that someone may know a better way. I'm not too worried about bus capacitance (within reason) because speed is the one thing I do not need, 2MHZ Clock is fine. I2C is usually a bit more of a pain so I'd like to stick with SPI if possible.

Thanks in advance for any inputs.

john

  • Hi John,
     
    You can also use SPI1_CS1 from processor pin C18. The net is named GPIO0_7. You mau need to remove R51 or program GPIO3_18 (pin B12) as input.
  • Biser,

    Thanks for the response. That's good information, I did not know that. I was just looking at the pin-out information in the users manual.

    This particular Beagle Bone Black(BBB) application involves the processor attached to back side of a  back-plane communicating with eight daughter cards plugged into the front side of a back-plane. Each daughter cards has an MSP430. The BBB communicates with the '430s via SPI. It also communicates with a '430 on a power supply card.

    One idea I,m considering is to use four GPIO's from the BBB to drive the select pins of a SN74CB3Q3251 (1-of-8 FET Multiplexer/Demultiplexer) to route the CS pin of the SPI interface to the particular daughter card I wish to handle. It's an easy hardware fix but I'm not sure of the software headache I'd be creating if I implement this. I plan to run Android to control all of this, can you provide any insight into the nature of the "can-of-worms" I might be opening given this approach? For example, if this is feasible are there preferred GPIO pins I should consider first?

    Thanks in advance for any insight you might be able to provide.

    john

  • HI John,
     
    I'm not a software expert, but it shouldn't be hard to implement. GPIO's can be easily controlled from user space,