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.

Parallel Spi on am18xx

Dears;

If I connect multiple cpus' Spi ports to same bus; and through software choose which cpu and when to be master or slave; then what happens if by mistake or conflict more than one cpu drives the clock and/or data pins.

Then one cpu drives it Low and another drives it high at the same time till the software realizes the conflict..

I read the SPI questions on these forums but couldn't find any answer.

It may be a dumb question; but is it going to mess up the IC? or any other damage?

I can do that with I2C; but that is too slow. Can I use spi for Multiple Cpus to the same bus?

thanks.

 

  • It seems like a better solution would be to use external switches, controlled by a GPIO, to choose which device is driving the clock and data lines. This way you could guarantee only one master is driving the bus at a time. How many devices can potentially be masters in your system?
    Jeff

  • Hi Jeff, there are 9 Cpus to share the bus. I have thought of 4 port, hi speed switches(one for each cpu/spi). I was trying to reduce space and cost and per my analysis; under normal software initializations, there should not be a problem since all the non participating cpus(at any one time) ; spi pins can be tri-stated while only a master and one slace to act. Everything seams to be fine; only if it be ok if  there be a conflict. and the two devices to drive a spi port at the same time. this can also happen with ony one master/one slave by software mistakes. I am still trying to understand from data sheets that whether when two Cpus drive the spi port with high and low; how dammaging it is?

    thanks for the info.

     

     

  • We do not have a spec in the datasheet for maximum current that can be driven into a pin, if for example 8 CPUs drive high and 1 CPU drives low. The amount of damage depends on how long the board is in that state and how many devices are opposing it at one time.

    So in general, yes the parts can be damaged by this. Your best solution will be to make sure that this never happens either through separate switches or careful software coordination.

    Jeff