Pixhawk reboots each USB connection - disconnection

Hi
We use USB port located on Pixhawk 2 top side (link) for connection to companion computer.
Pixhawk primary power-source is defined as power module. However, each time the usb connection is reset (usb plug in-out, reset to CC), the pixhawk performs reboot, (despite the fact that it continuously receives power via power module)
We don’t want to use telemetry port, because we have significant rates drop on FTDI.
Maybe there is a possibility to disable power via USB?

This is by design. USB is not tested / safe to fly with (its a pretty big chunk of code that’s running and the first rule of robust aviation systems is to not have code running that you don’t need) and so the system reboots once you disconnect USB in order to unload the USB driver.

You need to be using the FTDI and configure the UART correctly (baud rate, etc): https://dev.px4.io/v1.9.0/en/companion_computer/pixhawk_companion.html

Note that processing data also takes CPU load and so the maximum rate on UART / FTDI is roughly what the system can take. Using USB would just hide / shift the problem and you’d be confronted with other issues down the road.

If you are really opinionated about using USB I can show you how to disable the auto-reboot. But then you’re really on your own, because we’re not testing this as we’ve decided we think its not safe.

1 Like

@LorenzMeier, Thank you very much for your response.
I want to get data from FCU (such as odometry, IMU, etc…) at or above 100HZ
When I use FTDI (Ft232r) connection, (with the parameters configured as in the link above), I get the data in batches.
Below you can see the data presented in plotJuggler. You may see that some of the data comes in batches of 2 (so actual rate is 50 Hz).


I tried baud rate up to 3000000 and tried to put either MAV_1_RATE = 0 or explicitly 3000000 - the same result.
When I use USB connection, the data stream is continuous.
Another “measure” for this phenomenon is that logs download via QGC is 30 kb/S via FTDI (with above definitions) and ~120kB/s via USB.
I do need this high rate data-stream
I would like to follow your recommendations and use FTDI. Do you have suggestions on where is my mistake and how to improve the data-streaming.
If not, could you please kindly show how to disable the auto-reboot (I use Firmware v1.10.1).
Thanks

1 Like