Вопрос

SPI protocal use on MCU & device. I want know if it can use on two mcu's communication. like s3c2440 & msp430. if it's ok ,what I should take care.(they have different clock 25MHz & >100MHz) if it can't use,tell some reason thanks

Это было полезно?

Решение

Yes, provided at least one of the MCUs can act as an SPI slave, there should be no problem with that.

The SPI bus should be independently clocked from the CPU clock frequency, so you shouldn't have a problem finding a common supported speed.

Другие советы

It's possible to use SPI for communication between CPUs if at least one device can act as an SPI slave, but SPI has two major problems when used for such purposes:

  1. There is no standard mechanism for a slave device to indicate when it is ready for the master to clock the next byte, nor to indicate that the master has clocked a byte when the slave was not ready. Consequently, it is necessary to either use an additional communications line for this purpose, or have the master wait long enough after each byte to accommodate the slave's worst-case timing.
  2. There is no standard mechanism by which a master or slave can indicate whether or not it has anything to say, nor by which it can indicate that it wants to transmit but isn't ready to receive.

Unless a processor includes sufficient hardware to handle a "mailbox-style" system without CPU intervention, I would regard SPI as being inferior in almost every way to simple async serial.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top