40.7.1 Modes of Operation

The SPI operates in Host mode or in Client mode.

  • The SPI operates in Host mode by setting the MSTR bit in the SPI Mode Register (SPI_MR):
    • Pins NPCS0 to NPCS3 are all configured as outputs
    • The SPCK pin is driven
    • The MISO line is wired on the receiver input
    • The MOSI line is driven as an output by the transmitter.
  • The SPI operates in Client mode if the MSTR bit in SPI_MR is written to ‘0’:
    • The MISO line is driven by the transmitter output
    • The MOSI line is wired on the receiver input
    • The SPCK pin is driven by the transmitter to synchronize the receiver.
    • The NPCS0 pin becomes an input, and is used as a Client select signal (NSS)
    • The NPCS1 to NPCS3 pins are not driven and can be used for other purposes.

The data transfers are identically programmable for both modes of operation. The baud rate generator is activated only in Host mode.