46.7.8.1 Modes of Operation

The USART can operate in SPI Host mode or in SPI Client mode.

Operation in SPI Host mode is programmed by writing 0xE to the FLEX_US_MR.USART_MODE field. In this case, the SPI lines must be connected as described below:

  • The MOSI line is driven by the output pin TXD
  • The MISO line drives the input pin RXD
  • The SCK line is driven by the output pin SCK
  • The NSS line is driven by the output pin RTS

Operation in SPI Client mode is programmed by writing to 0xF the FLEX_US_MR.USART_MODE field. In this case, the SPI lines must be connected as described below:

  • The MOSI line drives the input pin RXD
  • The MISO line is driven by the output pin TXD
  • The SCK line drives the input pin SCK
  • The NSS line drives the input pin CTS

In order to avoid an unpredictable behavior, any change of the SPI mode must be followed by a software reset of the transmitter and of the receiver (except the initial configuration after a hardware reset). (See Receiver and Transmitter Control.)