Help required performing Single Master – Multiple(upto 16) Slave SPI Communication using MSP430


I am planning to use MSP430F6638 for SPI Communication between a single MSP430 Master and multiple MSP430 Slaves. I am using a 4×16 Multiplexer before each Slave for providing the Chip Select Signal. This allows for using 4 GPIO wires to address 16 Slaves.
I am curious about the following issues and would like to have suggestions about the possible solutions.

  1. The wire distance goes up to a maximum of 10m, will I face clock synchronization issues? What can I do to solve it?
  2. Should I use unidirectional line buffers on the CLK, SOMI, MOSI pins and Chip Select GPIO wires in order to be able to address 16 Slaves? As for the fan-out, the MSP430 datasheet says (as I understood) that fan-out must not increase 48mA on all pins combined and I am using some other peripherals simultaneously, so it’s difficult to calculate the remaining capability.
  3. Should I try going for a Daisy-Chain configuration? Does anybody have experience of writing software for Daisy Chain? Will it be of help using a Real Time Operating System or SYS/BIOS for writing the complex firmware required in case of Daisy Chain?

I would highly appreciate useful suggestions and comments. Thanks

Best Answer

(Hopefully) Useful suggestions and comments: -

Your clock speed is not unreasonable but you have to maintain shape so some care in using line drivers and receivers is needed. Another thing you have to watch out for is that when you poll a slave, it will respond synchronized with the clock it receives and drivers and cable introduce delay.

No problem at the slave end but when the reply is sent from the slave, the total delay up and down the line may, on fast clocks push the received symbol too much out of skew with the clock the master is using to "collect" the data. Something to watch out for.

Regarding your 4:16 line CE idea - the slaves are intelligent, why don't you embed an address into each slave and the master transmission then, only the correct slave will respond. It's a little more overhead but I get the impression is isn't a critically fast application. This of course is taking you down a kind of synchronized RS485 scheme which leads me to ask why this isn't considered for your application; running unsynchronized will not cause clock skew errors and at your data rate, 10 metres is easy.