46.8.1 Modes of Operation

The SPI operates in Host mode or in Client mode.

  • The SPI operates in Host mode by writing a 1 to the MSTR bit in the SPI Mode register (FLEX_SPI_MR):
    • The 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 FLEX_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).
    • Pins NPCS1 to NPCS3 are not driven and can be used for other purposes.

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