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.

MSP430 simultaneous SPI communication with multiple slaves

Other Parts Discussed in Thread: MSP430G2553

Is there a way to configure the MSP430 SPI to write to multiple slaves while ignoring the MISO line?  I understand that typical operation is to either communicate 1 on 1 or to use a daisy chain scheme.  For this application, I don't believe a daisy chain will work, so I want to force the SPI message and then check afterwards 1 on 1 to make sure the write was successful.

I'm using the MSP430G2553 with a Launchpad and I'm using five GPIOs as the chip select lines.  I'd like to perform several write operations with all of the chip select lines pulled low and then use each one individually to verify that the write operation was successful.

Thanks!

  • Short answer: Sure, just ignore what comes into the RXBUF. This is not a particularly good practice, though

    Longer answer: The slaves will all be driving MISO simultaneously, which means bus contention since they'll (in general) be driving it different directions. There's nothing the master can do (unilaterally) to prevent this. They won't malfunction (in my life I've only seen one SPI unit that monitors its output line), but on average half of the slaves will be dumping current on the bus while the transaction is going on. This is unpleasant but will be over once you de-assert /CS. You probably won't find a EE who will approve of this design, but it should produce the result you're looking for.

    Obligatory war story: Some years ago I constructed an SPI-ish multidrop broadcast bus for an array of F2012s. In that case, though, I wrote the code for both master and slave, and I could arrange for the slaves to disable (float) their MISO pins as needed to prevent contention.


    [Edit: Fixed overly-glib first line.]

  • TO prevent the excess current, one can put a diode between each slave’s output and the master input. And a (rather strong) pull-up on the master’s side. This will somewhat limit the maximum SPI speed (depending on how strong the pull-up is) in case you want an answer, but it will prevent the slave outputs fighting each other.

    Of course, if you never need an answer from any slave, just don’t connect their outputs at all. :)

**Attention** This is a public forum