35.6.7.4 SERCOM USART Hardware Handshaking

The USART features a hardware handshaking flow control option, implemented by cross connecting the RTS pin of a receiving device to the CTS pin of transmitting device as shown in the following figure.

Figure 35-11. Typical RS-232 Use Example with a Remote Device Hardware Handshaking (Flow Control)
Note:
  1. The recommended ground inductor should be a power line ferrite ≥ 680 Ω @ 100 MHz w/DCR ≤ 0.15 Ω.
  2. The TVS, Transient Voltage Suppressor, should be a bi-directional Zener w/Reverse Standoff voltage rating > 10% of the maximum signal operating levels, and a Peak Pulse current rating ≥ 10 amps.
Figure 35-12. Null Modem Cable Wiring Example
  • RTS: Request to Send Output
  • Logic low: Receiving device is ready to receive data
  • Logic high: Receiving device not ready to receive data
  • CTS: Clear to Send Input
  • Logic low: Indication to transmitting device that it’s clear to transmit
  • Logic high: Indication to transmitting device to stop transmitting
  • Hardware handshaking is only available in the following configuration:
    • USART with internal clock (CTRLA.MODE=1)
    • Asynchronous mode (CTRLA.CMODE=0)
    • Flow control pinout (CTRLA.TXPO=2)

When using Flow Control, the receiving device will drive the RTS pin inactive high whenever any of the following conditions are met:

  • CTRLB.RXEN=0
  • If FIFOEN=1, and the receive FIFO is full
  • FIFOEN=0, and the receive RxDATA, (DATA register), is full and INTFLAG.RXC=1

When any of the conditions above are met, RTS output from the receiving device goes inactive, (i.e., logic high). This notifies the remote transmitting device through the CTS input pin to stop the transfer after any ongoing transmission that may already be in progress to stop. Any transfer in progress when RTS goes inactive, will complete with the incoming data stored in the RX shift register until if ,FIFOEN = 1, the receive FIFO is no longer full or if FIFOEN = 0 the DATA register is empty, (i.e., INTFLAG.RXC = 0). Enabling and disabling the receiver by writing to CTRLB.RXEN will clear/set respectively the RTS pin after a synchronization delay.

Figure 35-13. Receiver/Transmitter Behavior when Operating with Hardware Handshaking (Flow Control)

The current CTS pin Status is reflected in the STATUS register (STATUS.CTS). Character transmission will resume only if STATUS.CTS = 0. When CTS is set, the transmitter will complete the ongoing transmission and stop transmitting. Disabling the receiver, (CTRLB.RXEN = 0,) will disable the receiver, flush the two-level receive buffer, and data from any ongoing receptions will be lost.