45.6.8.1 Modes of Operation

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

SPI Host mode is enabled by writing 0xE to US_MR.USART_MODE. 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

SPI Client mode is enabled by writing to 0xF US_MR.USART_MODE. 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 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).