MATLAB Simulink-Hardware support for PX4 autopilot UAV

I'm trying to upload the firmware through UAV Toolbox support package for PX4 autopilots. The initial Hardware Setup is completed. I'm using the one of the MATLAB examples for the same toobox package to upload my code into the PX4 flight controller.
The problem is that MATLAB is not detecting the "ProfiCNC CUBE F4 FMU (COM3)" port but detecting the "Legacy FMU (COM5)" port, which renders the system to show a message saying
"Attempting reboot on COM5 with baudrate=57600... If the board does not respond, unplug and re-plug the USB connector."
I had faced the same problem with the initial "Hardware Setup" process, which i could overcome by simply rebooting the hardware just before the MATLAB firmware upload subprocess.
Now when i try to upload a customized Firmware based on one of the examples for the UAV toolbox, Im not able reboot the hardware since the hardware cannot be reboot in the middle of the Simulink program. Please suggest a solution for the problem.

6 Comments

You can reboot your hardware while you get this message. Why do you think you cannot reboot your hardware?
I tried to reboot the hardware but the hardware takes about 8 seconds to boot up and the program requires that the hardware be already connected and detectable for the build process to start. Otherwise, it shows an error. I tried to time the hardware boot up sequence with the build sequence but never managed to get it to accept the hardware and always ended up with error messages.
I had also tried to do it while the program is running, but the same message kept repeating even after rebooting that way.
I have the same problem with the pixracer: When trying to upload the firmware I get the following message:
Loaded firmware for board id: 11,0 size: 1664940 bytes (80.02%), waiting for the bootloader...
Attempting reboot on COM11 with baudrate=57600...
If the board does not respond, unplug and re-plug the USB connector.
Did anyone had luck to solve this issue?
Hello, I have the same problem with the pixhawk 4... When using the UAV toolbox i can build the firmware but when i'm trying to upload, the board keeps turning ON and OFF and i have the message : "Attempting reboot on COM8 with baudrate=57600... If the board does not respond, unplug and re-plug the USB connector."
Can someone help me please ?
thx
This solves the issue:
https://se.mathworks.com/help/supportpkg/px4/ug/troubleshooting-firmware-upload-px4.html

Sign in to comment.

Answers (1)

This issue is mostly due to two different COM ports coming uo for your Pixhawk board (one for upload and one for communication). Some boards have this special behavior. On most other boards, the upload and communication port is same and there is no such issue.
To troubleshoot the issue of Uploading the firmare in Test Connection, see Troubleshooting Unresponsive Firmware Upload.
Also to successfully upload firmware from Simulink, set the COM ports correctly as shown in Set COM Port for Upload and Communication in Simulink

Asked:

on 22 Sep 2021

Answered:

on 11 Nov 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!