
709
SAM G51 [DATASHEET]
11209C–ATARM–20-Dec-13
30.7.7.6
Character Reception
When a character reception is completed, it is transferred to the Receive Holding register (US_RHR) and the RXRDY bit
in the Status register (US_CSR) rises. If a character is completed while RXRDY is set, the OVRE (Overrun Error) bit is
set. The last character is transferred into US_RHR and overwrites the previous one. The OVRE bit is cleared by writing a
one to the RSTSTA (Reset Status) bit the US_CR.
To ensure correct behavior of the receiver in SPI slave mode, the master device sending the frame must ensure a
minimum delay of 1 Tbit between each character transmission. The receiver does not require a falling edge of the slave
select line (NSS) to initiate a character reception but only a low level. However, this low level must be present on the
slave select line (NSS) at least 1 Tbit before the first serial clock cycle corresponding to the MSB bit.
30.7.7.7
Receiver Timeout
Because the receiver baud rate clock is active only during data transfers in SPI mode, a receiver timeout is impossible in
this mode, whatever the time-out value is (field TO) in the US_RTOR.
30.7.8 Test Modes
The USART can be programmed to operate in three different test modes. The internal loopback capability allows on-
board diagnostics. In loopback mode, the USART interface pins are disconnected or not and reconfigured for loopback
internally or externally.
30.7.8.1
Normal Mode
Normal mode connects the RXD pin on the receiver input and the transmitter output on the TXD pin.
Figure 30-30. Normal Mode Configuration
30.7.8.2
Automatic Echo Mode
Automatic echo mode allows bit-by-bit retransmission. When a bit is received on the RXD pin, it is sent to the TXD pin, as
shown in
Figure 30-31. Programming the transmitter has no effect on the TXD pin. The RXD pin is still connected to the
receiver input, thus the receiver remains active.
Figure 30-31. Automatic Echo Mode Configuration
30.7.8.3
Local Loopback Mode
Local loopback mode connects the output of the transmitter directly to the input of the receiver, as shown in
Figure 30-32.The TXD and RXD pins are not used. The RXD pin has no effect on the receiver and the TXD pin is continuously driven
high, as in idle state.
Receiver
Transmitter
RXD
TXD
Receiver
Transmitter
RXD
TXD