SPI Master Interface
By using the SPI Master Interface you can work with a single master device. The creation of a multi-master SPI system is possible, but there is nothing described in the SPI specification about multiple masters issue.
To start a communication, the master device configures the serial clock (SCK), using a frequency less than or equal to the maximum frequency the slave device supports. The SCK logic signal always sent from master device and input to all slave devices. It means that the master device generates the clock signal while sending data. The master device is the active part in the system and always has to provide the clock signal a serial data transmission is based on.
The MOSI (Master Output Slave Input) logic signal is always generated by the master SPI Bus Host Adapter device and supplies the data from master to slave.
For multiple slave devices system the master device generates a separate slave select (SS) signal for each slave device. In the independent slave configuration, there is an independent SS line for each slave device.
The SS pin plays a main part in the SPI configuration. In master mode, the SS pin must be held high to ensure master SPI operation if this pin is configured as an input pin (or vice-versa in the Active High mode). The usb spi master device must select only one slave device at a time.
Overall, the master device provides the SCK logic signal, MOSI logic signal and determines the state of the chip select lines, i.e. it activates the slave it wants to communicate with.