Hi all, I’m encountering some issues.
I’m trying to send Return-To-Launch (RTL) commands from an RP2040/RP2350 to a Pixsurvey Cube V3 via UART.
I followed this guide: Mavlink Peripherals on the RP2040 and successfully sent/received commands using the provided instructions.
I modified the code and was able to send RTL commands to my simulated autopilot (using sim_vehicle.py
) via a USB-TTL adapter.
However, when I tried sending commands to real hardware, it failed.
Full details below:
Setup:
- Microcontroller: RP2040 (MicroPython)
- Autopilot: Pixsurvey Cube V3
- Communication: UART (921600 baud) on TELEM2 port
- Purpose: Sending MAVLink commands to the Cube V3.
Problem:
- MAVLink commands sent from the RP2040 work perfectly with a simulated autopilot (using
sim_vehicle.py
) via a USB-TTL adapter. - However, commands fail when connected to the real hardware (Pixsurvey Cube V3).
- Data from the Cube V3 is successfully received, confirming the RX pin is functional.
Weird Behavior:
- Commands only work if the RX pin is temporarily shorted to 3.3V before while sending data.
Key Observations:
- The Cube V3 continuously sends MAVLink data, which may overrun the UART buffer or block the TX line.
- Temporarily shorting the RX pin may reset the UART state, enabling commands to go through.
- Possible causes include voltage level mismatches, UART framing errors, or protocol synchronization issues.
Attempted Fixes (Failed):
- Adjusting UART settings, timeouts, and flow control.
- Pausing RX processing or using separate UARTs for TX/RX.
- Sending a break condition to reset the line before transmitting.
- Adding pull-up resistors, capacitors, and Schottky diodes to stabilize the RX signal.
- Switching serial ports and reconfiguring MAVLink parameters.
- Using software flow control (XON/XOFF).