Serial Port Configuration Options¶
This page describes the configuration options for the serial ports. Currently, some of these options are supported only on specific autopilots.
Logical Serial Port to Physical UART Assignment¶
ArduPilot Serialx Port numbering is logical, rather than physical. Which UART or USART port is assigned to a Serial Port is determined by the autopilot’s hardware definition file. Serial Port 0 is always assigned to the USB port, but others can vary. Check its description page
more serial ports may be shown in the parameters than exist on a given controller. Check its description page
By default the protocols/expected peripheral for each port is shown below:
any supported protocol/peripheral can be used by any port by changing its
|Serial 0||USB port, MAVLink2 protocol|
|Serial 1||Telemetry port 1, MAVLink1 protocol|
|Serial 2||Telemetry port 2, MAVLink1 protocol|
|Serial 3||GPS1 port|
|Serial 4||GPS2 port|
|Serial 5||USER port, disabled|
|Serial 6||USER port, disabled|
|Serial 7||USER port, disabled|
Often cased autopilots will have the designation “TELEM1”, “GPS”, etc. marked on the case, otherwise, the autopilot description page should provide the mapping to SERIALx Port
The serial ports support many different kinds of interfaces and peripheral. The
SERIALx_PROTOCOL parameter determines what type of device/interface is expected.
MAVLink1, See Telemetry Setup
MAVLink2, See Telemetry Setup
FrSky D, See FrSky Telemetry
FrSky SPort, See FrSky Telemetry
Alexmos Gimbal Serial, See Alexmos Gimbal
SToRM32 Gimbal Serial, See SToRM32 Gimbal
Rangefinder, See Rangefinders
FrSky SPort Passthrough (OpenTX), See FrSky Passthrough Telemetry
Lidar360, See 360 Lidars here
Beacon, See Non-GPS Navigation
Volz Servo, See Volz Servos
SBus Servo, See SBus Servos
ESC Telemetry, See ESC Related Configuration
OpticalFlow, See Optical Flow Sensors
RobotisServo, See Robotis Servos
|20||NMEA Output, NEMA Output stream from GPS|
WindVane, See Wind Vane
RC Input, See Typical Autopilot Wiring Connections
MegaSquirt EFI, see MegaSquirt EFI
LTM Telemetry, see LTM Telemetry
Runcam see RunCam Camera Support
HOTT Telem see HOTT Telemetry
Scripting see Lua Scripts
Crossfire Receiver Team Black Sheep RC Systems
Generator see RichenPower Generator
MSP Telemetry see Multiwii Serial Protocol (MSP)
DJI FPV telemetry see MSP OSD
Serial Airspeed sensor
Serial ADSB receiver
Every serial port has in addition, to its baud rate (
SERIALx_BAUD) and protocol format (
SERIALx_PROTOCOL), the ability to invert its RX input and/or TX data, operate in half-duplex mode, and/or swap its RX and TX inputs.
For example, for direct connection to FRSky SPort telemetry, normally inverters and diode OR externally would be required. With SERIALx_OPTIONS bitmask set to 7, direct connection to the SPort can be accomplished from a serial port.
- if bit 0 is set, then RX data received is inverted internally.
- if bit 1 is set, the TX data is inverted before outputting.
- if bit 2 is set, then HalfDuplex operation using the TX pin is implemented.
- if bit 3 is set, then the TX and RX pins are effectively swapped internally.
HalfDuplex is supported on all ChiBiOS based autopilots, but all other options are only supported on boards with F7 or H7 microprocessors.