</>EmbeddedInterview

What is hardware flow control?

EasyCommunication Protocols

Short answer: Hardware flow control uses two extra signals, RTS (request to send) and CTS (clear to send), so a receiver can tell the transmitter to pause. Each side's RTS output connects to the other side's CTS input. When the receiver's buffer is nearly full it de-asserts RTS; the transmitter checks CTS before sending each character and stops until CTS is asserted again. This prevents overruns at high baud rates.

MCU TX  ───────────►  RX  Module
MCU RX  ◄───────────  TX
MCU RTS ───────────►  CTS      (MCU says "I can receive")
MCU CTS ◄───────────  RTS      (module says "I can receive")

When it is needed: cellular modems, Wi-Fi/BLE modules and high-speed links where the receiver can be busy (flash writes, radio events). Without it, bursts can overflow buffers and data is silently lost.

Software flow control (XON/XOFF): the receiver sends special characters (0x11 XON, 0x13 XOFF) in the data stream. It needs no extra wires but cannot be used with binary data (those byte values may appear in the payload) and reacts more slowly.

Practical notes

  • The transmitter usually finishes the byte in progress (and sometimes a FIFO's worth) after CTS drops, so the receiver should de-assert RTS with a few bytes of headroom.
  • Many MCU UARTs support automatic RTS/CTS in hardware; enabling it avoids firmware timing issues.
  • Naming confusion: some datasheets name pins from the device's point of view, some from the host's; check the direction carefully.
  • On Linux: stty -F /dev/ttyS1 crtscts or CRTSCTS in termios.