Interface and SERIALx Configuration
Official reference: ArduPilot Serial Options. The official web page may be updated. When using it, verify the parameter definitions for ArduPilot Copter 4.8.0.
4 min read · English documentation
Official reference: ArduPilot Serial Options. The official web page may be updated. When using it, verify the parameter definitions for ArduPilot Copter 4.8.0.
For the pin order of connectors such as TELEM, GPS, and PWM, see Appendix: FlyCore-FC Interfaces and Pin Definitions.
Prerequisites
- The current parameters have been exported and backed up.
- The protocol, baud rate, and power supply method required by the peripheral have been confirmed.
- The target interface has been confirmed not to be occupied by GPS, remote control, or another MAVLink link.
1. Confirmed Serial Port Mapping
SERIALx is the logical serial port number in ArduPilot; UART/USART/OTG are the hardware peripherals used by the flight controller processor; and USB, TELEM, GPS, and SBUS are the interfaces that users can identify or connect to. The correspondence among the three is defined by the board-level hardware and cannot be interchanged by changing parameters.
Complete Mapping
| ArduPilot Serial Port | Hardware Peripheral | Corresponding Interface | Board-Level Default Protocol | Interface Description |
|---|---|---|---|---|
SERIAL0 |
OTG1 | USB | MAVLink2 | USB ground station connection |
SERIAL1 |
USART2 | TELEM1 | MAVLink2 | First external telemetry serial port |
SERIAL2 |
USART3 | TELEM2 | MAVLink2 | Second external telemetry serial port |
SERIAL3 |
UART4 | GPS1 / onboard UM982 | GPS | Occupied by the onboard GNSS module |
SERIAL4 |
UART5 | TELEM3 | MAVLink2 | Third external telemetry serial port |
SERIAL5 |
USART6 | SBUS | RC Input | Remote control receiver input |
SERIAL6 |
UART7 | GPS2 | GPS | External GPS serial port |
SERIAL7 |
UART8 | Debug pads | Disabled | Disabled by default; used only for debugging or expansion |
SERIAL8 |
OTG2 | Not exposed | Disabled | No available external interface |
GPS1is an internal connection to the onboard UM982 and should not be used as a regular external serial port. AlthoughSERIAL8exists in the parameter list, its corresponding OTG2 is not exposed, so configuring this serial port will not provide a physical interface that can be connected.
2. TELEM and MAVLink Wiring
- TELEM1: Low-speed telemetry or ground station link.
- TELEM2: High-speed MAVLink or onboard computer.
- TELEM3: Second onboard computer, payload, or high-speed MAVLink peripheral.
When wiring:
- Connect the flight controller TX to the peripheral RX.
- Connect the flight controller RX to the peripheral TX.
- Connect the GND of the flight controller and the peripheral to a common ground.
- Keep the protocol and baud rate consistent between the flight controller and peripheral ends.
- At higher baud rates, pay particular attention to wiring harness quality, grounding, interference, and peripheral serial port stability.
3. GPS2 and RC Input
GPS2 is the external GPS serial port. When enabling an external GPS2, also check GPS2_TYPE, SERIAL6_PROTOCOL, and SERIAL6_BAUD, and confirm that the output protocol and baud rate of the external module match.
To use SBUS:
RC_PROTOCOLS = 1
SERIAL5_PROTOCOL = 23
SERIAL5_BAUD = 57
After connection, check the channel response, direction, center value, endpoints, and mode switch on the Radio Calibration page in Mission Planner, and verify that the link-loss state can be detected after the remote controller is turned off.
4. Moving a Serial Port Device
- Record the original interface, target interface, peripheral type, protocol, and baud rate.
- Confirm that the target interface is not occupied by another device.
- Change
SERIALx_PROTOCOLfor the original interface to0, or assign it a new, clearly defined purpose. - Set
SERIALx_PROTOCOLfor the target interface to the value required by the peripheral. - Set
SERIALx_BAUDfor the target interface. - If the peripheral has special electrical requirements, also check
SERIALx_OPTIONS. - Save the parameters and restart the flight controller.
Example
Original interface:
SERIAL2_PROTOCOL = 2
SERIAL2_BAUD = 921
Target interface:
SERIAL4_PROTOCOL = 2
SERIAL4_BAUD = 921
If TELEM2 is no longer used, set SERIAL2_PROTOCOL to 0 to avoid occupation by a duplicate link.
5. Post-Migration Checks
- The parameters have been saved, and both the flight controller and peripheral have been restarted.
- TX and RX are cross-connected, and GND is connected to a common ground.
- Mission Planner displays the expected data.
- The MAVLink device receives HEARTBEAT messages.
- The corresponding GPS is recognized on the GPS page.
- No
GPS: not healthy,No RC receiver,PreArm, or serial-port-related warnings persist in Messages.
