MAVLINKHUD

Overview

The UART parameter group (specifically within AP_Periph) configures the physical serial ports on peripheral hardware.

Key Concepts

1. Serial Mapping

On DroneCAN nodes, UARTs are used to connect GPS receivers or ADS-B units.

  • UARTx_OPTIONS: Bitmask for signal inversion and swapping.
  • UARTx_RTSCTS: Enables hardware flow control.

Developer Notes

  • Library: Tools/AP_Periph.
  • See Also: SERIAL for the main autopilot serial configuration.

UART0_OPTIONS

Default 0
Range 0 15

UART 0 Serial Options (UART0_OPTIONS)

Description

UART0_OPTIONS (usually appearing as SERIAL0_OPTIONS) provides low-level electrical control over the primary communication port.

This is often used when connecting the flight controller to non-standard hardware that requires specific signal logic.

  • Bit 0 (1): Invert RX. Flips the high/low logic for receiving.
  • Bit 1 (2): Invert TX. Flips the high/low logic for transmitting.
  • Bit 2 (4): Half-Duplex. Combines TX and RX onto a single wire (One-Wire mode).
  • Bit 3 (8): Swap Pins. Swaps the RX and TX functionality (Requires STM32 F7/H7).

Tuning & Behavior

  • Default: 0.
  • Usage: Only change if your external hardware (like an RC receiver or specialized sensor) explicitly requires it.
  • Reboot Required: Yes.

UART0_RTSCTS

Default 0
Range 0 2

UART 0 Flow Control (UART0_RTSCTS)

Description

UART0_RTSCTS enables Hardware Flow Control for the primary serial/USB port.

It is functionally identical to UART1_RTSCTS.

UART1_OPTIONS

Default 0
Range null

Serial options

Note: This parameter functions identically to SERIAL1_OPTIONS.

UART1_RTSCTS

Default 2
Range 0 3

UART 1 Flow Control (UART1_RTSCTS)

Description

UART1_RTSCTS enables Hardware Flow Control for the first telemetry port.

Flow control uses two extra wires (RTS and CTS) to signal when a device is ready to receive data. This prevents "Buffer Overflows" where one device sends data faster than the other can process it, which would otherwise result in corrupted or missing telemetry.

  • 0: Disabled.
  • 1: Enabled.
  • 2: Auto (Default). The autopilot will attempt to detect if the connected device supports flow control.

Tuning & Behavior

  • Recommendation: Leave at 2 (Auto).
  • SiK Radios: These radios support hardware flow control. If you have the RTS/CTS wires connected, this setting will ensure maximum data reliability.

UART2_OPTIONS

Default 0
Range null

Serial options

Note: This parameter functions identically to SERIAL1_OPTIONS.

UART2_RTSCTS

Default float(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE
Range null

Serial1 flow control

Note: This parameter functions identically to UART1_RTSCTS.

UART3_OPTIONS

Default 0
Range null

Serial options

Note: This parameter functions identically to SERIAL1_OPTIONS.

UART3_RTSCTS

Default float(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE
Range null

Serial1 flow control

Note: This parameter functions identically to UART1_RTSCTS.

UART4_OPTIONS

Default 0
Range null

Serial options

Note: This parameter functions identically to SERIAL1_OPTIONS.

UART4_RTSCTS

Default float(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE
Range null

Serial1 flow control

Note: This parameter functions identically to UART1_RTSCTS.

UART5_OPTIONS

Default 0
Range null

Serial options

Note: This parameter functions identically to SERIAL1_OPTIONS.

UART5_RTSCTS

Default float(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE
Range null

Serial1 flow control

Note: This parameter functions identically to UART1_RTSCTS.

UART6_OPTIONS

Default 0
Range null

Serial options

Note: This parameter functions identically to SERIAL1_OPTIONS.

UART6_RTSCTS

Default float(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE
Range null

Serial1 flow control

Note: This parameter functions identically to UART1_RTSCTS.

UART7_OPTIONS

Default 0
Range null

Serial options

Note: This parameter functions identically to SERIAL1_OPTIONS.

UART7_RTSCTS

Default float(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE
Range null

Serial1 flow control

Note: This parameter functions identically to UART1_RTSCTS.

UART8_OPTIONS

Default 0
Range null

Serial options

Note: This parameter functions identically to SERIAL1_OPTIONS.

UART8_RTSCTS

Default float(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE
Range null

Serial1 flow control

Note: This parameter functions identically to UART1_RTSCTS.

UART9_OPTIONS

Default 0
Range null

Serial options

Note: This parameter functions identically to SERIAL1_OPTIONS.

UART9_RTSCTS

Default float(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE
Range null

Serial1 flow control

Note: This parameter functions identically to UART1_RTSCTS.