Pixhawk won't boot, and doesn't connect well through USB

687 views
Skip to first unread message

Nitay Megides

unread,
Jul 9, 2015, 10:07:16 AM7/9/15
to drones-...@googlegroups.com
Hello all,

I was working on connecting a sensor through I2C to ArduPilot on Pixhawk.
I've branched from 3.3rc7 (Copter 3.3 branch) and added my code there.

I'm not sure what I did wrong, but now the pixhawk won't boot properly.

The COM connection on the PC hangs a lot. Sometimes SerialPort.Open() (On mission planner) succeeds and sometimes hangs until I pull the USB cable out.
MP PX4 uploader also hanged. Same issue.

I could, however, listen to the uart connection while the pixhawk boots, and that's what I got:

Init APM:Copter V3.3-rc7-TES (75c6f3ee)


Free RAM: 44224
FW
Ver: 120
----------------------------------------




load_all took
4262us
0 0 0 Q }‏3Initialising APM... }‏3Calibrating barometerzš‏ Q C^‏3barometer calibration complete׳ ‏3GROUND START—‰Init Gyro*‏ Q ׃**
INS
----------------------------------------
G_off
: -0.03, 0.01, -0.00
A_off
: -0.03, -0.09, -0.44
A_scale
: 1.00, 1.00, 0.98


After these lines I get nothing, and the pixhawk doesn't respond. Disconnect sometimes works, and sometimes hangs.
On a normal startup, after these lines the pixhawk sends "Ready to fly", right?


My code runs in userhook_Slowloop 3.3.hz (cool addition by the way, make development easier), but something went wrong after the latest version. 
My code reads a register from an I2C device. Right now the device is not connected, so the read fails (the code handles it).
The latest upload was done while my device was connected and powered from the I2C port as well. I think the pixhawk was powered from USB. There were no errors on upload.

It seems that the CPU is stuck somewhere or had an exception, but I can't find out where or how to fix it. The leds all flash properly. The main led is red or blue. The switch doesn't do anything.

So, 2 questions:
1. How do I get the pixhawk to respond? 
2. Can I reset the pixhawk to a preliminary software? Something I can work with to upload my own software?

Thanks for you help
Nitay

Grant Morphett

unread,
Jul 9, 2015, 10:55:57 PM7/9/15
to drones-...@googlegroups.com
Just switch branches to master and see if you can build and upload that to the pixhawk to check its functioning ok.

My guess is that you have added something to the userhook which takes a long time to complete.

Thanks, Grant.

Nitay Megides

unread,
Jul 11, 2015, 7:45:59 AM7/11/15
to drones-...@googlegroups.com
Yes you're probably right. 
However I can't get the pixhawk to respond to the upload process. It always stops responding right after powering up.

What does the reset IO button do? What does it reset?

Is there a way to tell the pixhawk to into "emergency mode" with USB communication only?

Thanks
Nitay

Nitay Megides

unread,
Jul 19, 2015, 4:15:35 PM7/19/15
to drones-...@googlegroups.com
For future googlers:
It took me a while but I managed to upload proper firmware onto the pixhawk. 

To do so, I used the mission planner uploader code and made my own version of the uploader in which I could control the timings more accurately. 
Then I rebooted the pixhawk to bootloader using the mavlink reboot command, and exactly when it entered bootloader mode started the uploading process.
It took a few trials, but once it gets to the 'erase' phase - You're golden.

It helps to know exactly when the Pixhawk is in bootloader mode - See this page for leds explanation
Reply all
Reply to author
Forward
0 new messages