When I use the external mode(Pixhawk Support Package) to connect the generated code in PX4FMU,there are some errors.
2 views (last 30 days)
Show older comments
When I use the external mode to connect the generated code,there are some errors as follows

But I can ensure I have started the code

I have switched the hardware to armed,I have the right setup as follows



Besides,I can start a non-external mode generated code,it works well. So,I am really confused by above errors,I hope there are someone who encountered these errors can help me,thank you!
2 Comments
lei he
on 21 Apr 2017
Hello, I have the same problem with you. I think it's a problem of Serial Port number. Did you solve this problem?
cindy bear
on 15 May 2017
Edited: cindy bear
on 15 May 2017
Hello,
In case you're still looking for a solution. I hope this helps, using the image from Djj as an example: If you're using an FTDI cable or radios, your baud rate is usually 57600, assuming that 'Prolific USB-to-Serial Comm Port" acts as one of those then
MEX-file arguments: 1 9 57600 5
Data Exchange Serial Port: (on your PX4 this could be TELEM 1, TELEM 2 or Serial 4/5) Assuming it's Serial 4/5 then 'ttyS6'
Baud Rate Select: 57600
If the error persists then check your wiring from the FTDI to the PX4, and that RX and TX aren't switched up.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!