px4io firmware update fails

1,222 views
Skip to first unread message

Holger Steinhaus

unread,
Nov 8, 2013, 3:28:24 PM11/8/13
to drones-...@googlegroups.com
Just tapped into some strange trouble while trying to upload a modified px4io firmware to fix the nasty SBus range and failsafe problems. 

I have reverted to a freshly formatted SD card, containing only one px4io.bin file (from http://firmware.diydrones.com/PX4IO/latest/PX4IO/). The blue LED gets on for about a second or two, before the flash procees seems to abort prematurely. 

Here is a console log:

checking for /etc/px4io/px4io.bin 
Checking for new px4io firmware 
nsh: cmp: open failed: No such file or directory
Loading /etc/px4io/px4io.bin 
[PX4IO] using firmware from /etc/px4io/px4io.bin
[PX4IO] found bootloader revision: 3
[PX4IO] erase...
[PX4IO] programming 46016 bytes...
[PX4IO] bad sync 0x9e,0xb9
[PX4IO] program failed
px4io: error updating PX4IO - check that bootloader mode is enabled

Any ideas? 

Holger

Tom Coyle

unread,
Nov 8, 2013, 3:57:38 PM11/8/13
to drones-...@googlegroups.com
Hi Holger,
 
I was talking to Tridge about updating the PX4 IO firmware to get the Spektrum PPM receiver interface working again with the ArduRover2 v2.43 PX4 v1.0 code. He told me that the PX4 IO firmware code is built into the ArudRover2 v2.43 PX4 v1.0 code and the process of loading the new PX4 IO from the SD card at boot up is really loading the code from the ArduRover2 v2.43 PX4 v1.0 code so the SD card is not being read during the update process. Following the PX4 IO update process at boot up did load in new PX4 IO firmware as the Spektrum PPM receiver interface started working correctly again after the update.
 
Regards,
Tom C ArduRover2 Developer

Robert Lefebvre

unread,
Nov 8, 2013, 5:09:17 PM11/8/13
to drones-discuss
Are you doing this under USB power or battery power?

I struggled with this updating for a while, and then found out that the USB can't supply enough current so it browns out or something. I then hooked up a battery, and it went no problem.


--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Holger Steinhaus

unread,
Nov 8, 2013, 7:08:43 PM11/8/13
to drones-...@googlegroups.com

loading the new PX4 IO from the SD card at boot up is really loading the code from the ArduRover2 v2.43 PX4 v1.0
That's a very good explanation why my first naive changes to the IO firmware showed no effect ;-)

Just tried to delete any file on SD card and booted up while holding the switch. Exactly the same behavior as before. The blue LED comes on for a short time - to short for a real update. The 3 tones for the update are played forever. 

I just tried battery power as well - no change (I know the USB power issue from earlier problems...). Feels like I bricked the IO board.

Gary McCray

unread,
Nov 8, 2013, 7:50:03 PM11/8/13
to drones-...@googlegroups.com
Hi All,
I just verified that (as Robert said) the method of loading SD card with IO firmware then loading SD card to IO board works when you connect battery and does not work when using a USB only connection.
Basically the method is download the firmware to the SD card as instructed in Mission Planner.
Then with the PX4 not connected to the USB, put the SD card with the PX4IO firmware in it back in the PX4.
Then push and hold down the PX4's safety button and Plug in the battery (requires 3 hands or a bit of creative dexterity)
Wait 60 seconds and release the button.
disconnect the battery.
You can stick the SD card back in the SD card reader and in to your computer, look at the files and it will tell you if it succeeded.
You can also look at the text file which will also verify success (or failure).
When you are done put the SD card back in the PX4 it won't work without it.
I am going to add this as an addendum to the PX4 firmware load wiki page, hope it helps.

Second update, for the newer versions of the firmware scrap the above, when you load the newer versions of Copter (3.1+), Plane 2.74+, Rover 2.42+ you don't need to use the SD card at all.
Procedure is as follows:
Load the PX4 firmware you need from Mission Planner.
Disconnect the USB from the PX4.
Hold down the PX4 safety button and connect the battery.
Wait till confirming tones.
Disconnect battery.
Thats it!

Best Regards,
Gary

Tom Coyle

unread,
Nov 8, 2013, 10:13:37 PM11/8/13
to drones-...@googlegroups.com
Hi Gary,
 
I will have to disagree with your statement that the PXI4O firmware can only be loaded when on the battery.
 
The first time I loaded the PX4IO firmware using the SD card, with Tridge's help, was when the PX4 FMU/IO was powered by the USB connection and it loaded just fine.
 
Since then, as I have stated above, the PX4 IO firmware is loaded from the Ardupilot installed code, in my case ArduRover2 PX4 v1.0, following the process used to load from the SD and can be done when using the USB connection to power the PX4 as I have successfully done so.
 
Regards,
Tom C ArduRover2 Developer

On Friday, November 8, 2013 3:28:24 PM UTC-5, Holger Steinhaus wrote:

Gary McCray

unread,
Nov 8, 2013, 11:52:02 PM11/8/13
to drones-...@googlegroups.com
Hi Tom, 
I put in the wiki that you could try it with USB power only, but also give the procedure for battery (with cautions) but the fact is a lot of USB power lines don't supply adequate power, mine certainly didn't.
Tried it on USB only and it failed 3 times..
Tried it with power hooked up and it immediately succeeded so my not so top of the line Dells USB doesn't supply enough power, won't run the PPM encoder and the receiver either, so no surprise really.
The bottom line is I am using the new code and now using the new PX4IO card load (like you) that loads straight from the PX4 bypassing the SD card completely, I put that in the wiki too. 
Please check it and see if I missed anything.
Best Regards,
Gary

Tom Coyle

unread,
Nov 9, 2013, 8:54:37 AM11/9/13
to drones-...@googlegroups.com
Hi Gary,
I fully agree with you.
 
If you are trying to program the PX4 FMU/IO by itself, the USB connection is sufficient.
 
I had to use a powered USB hub to power my PX4 FMU/IO once I added all of the accessories like the GPS, out board compass, and PPM radio receiver.
 
I have measured the voltage on the GPS when using a powered USB hub and it is barely 4.60vdc which might be due to a diode drop in the power circuit coming from the USB connection.
 
Using the battery give about 4.99vdc at the GPS connector.
 
Regards,
Tom C ArduRover2 Developer

On Friday, November 8, 2013 3:28:24 PM UTC-5, Holger Steinhaus wrote:

Holger Steinhaus

unread,
Nov 9, 2013, 2:48:16 PM11/9/13
to drones-...@googlegroups.com
On my very first experiments with the PX4 I got into the USB power problems as well, but I am not feeling really well near my copter with the flight battery connected. There is a very simple solution: get a powered hub with USB fast charging feature. These hubs usually provide 2 amps on some connectors.. Works with no difference to battery power here (if it works at all...). May be using a suffuciently powered hub should be recommended as a standard procedure in the docs? 
 
Please check it and see if I missed anything.
Excellent, exactly that piece of information was missing so far (at least from my perspective before reading this thread)

One suggestion, may be its better to use the term PX4FMU instead of PX4, e.g. here: 
1. The PX4IO board requires its own firmware to be directly loaded onto it separately from the _PX4FMU_ board itself
4. And the new method loading it directly from the firmware stored on the _PX4FMU_ itself

Regarding my flash problems: I just discovered that must have been be some power problem on my PX4IO board - the RC receiver does not show any LED anymore. Voltage on the SBus plug without receiver connected is about 1.6V. PX4FMU has clean 5V. Have to do some homework here...

Holger

Gary McCray

unread,
Nov 9, 2013, 5:13:53 PM11/9/13
to drones-...@googlegroups.com
Hi Holger,
I have added the suggested improvements.
My system uses the 3DR PPM-SUM encoder which is a notorious power hog, so definitely requires either the battery to be hooked up of the Fast Charge USB hub you recommended. 
(I will try one of the USB hubs with fast charge capability, because this problem has also made it impossible to calibrate the radio without hooking up the battery).
I had tried a regular powered USB hub and it did not supply sufficient current either.
Best Regards,
Gary

Tom Coyle

unread,
Nov 9, 2013, 5:40:43 PM11/9/13
to drones-...@googlegroups.com
Hi Gary,
 
I do not think that the USB HUB fast charge port will make a difference because from what I have read, the max current allowed on a USB connection is 500ma.
 
Therefore, I built a special one of a kind USB port that really could supply 2 amps and here is what I found:
 
  1. Voltage on GPS module with stock USB port connection: 3.96vdc.
  2. Voltage on GPS module with powered USB HUB port connection: 4.56vdc.
  3. Voltage on GPS module with one of a kind 2 amp USB port connection: 4.60vdc
Conclusion: There appears to be a one Schottky diode drop on the USB port power connection after it enters the PX4 FMU module as the voltage on my one of a kind 2 amp USB connection is 5vdc under load. I have seen the same phenomenon on the old APM1.4s where the voltage on the GPS module was around 4.6vdc even with a powered USB HUB.
 
Comments?
 
Regards,
Tom C ArduRover2 Developer  

On Friday, November 8, 2013 3:28:24 PM UTC-5, Holger Steinhaus wrote:

john...@gmail.com

unread,
Nov 9, 2013, 5:45:26 PM11/9/13
to drones-...@googlegroups.com
Regardless of working or not, having a 2A USB port makes it out of spec and cannot be something that is expected from users.

Gary McCray

unread,
Nov 9, 2013, 7:09:13 PM11/9/13
to drones-...@googlegroups.com
Hi John and Tom,
Per wikipedia for USB 2.0 
  • Battery Charging Specification 1.2:[16] Released in December 2010.
    Several changes and increasing limits including allowing 1.5 A on charging ports for unconfigured devices, allowing High Speed communication while having a current up to 1.5 A and allowing a maximum current of 5 A.
It does look like at least up to 1.5 amps is legitimate with USB 2.0 and of course a lot higher with 3.0.

Nonetheless, Tom your point is well taken.
Diode drop is always a problem and often missed or ignored and that definitely looks like a diode to me.
However, hard to know whether that would drop out the PX4IO from writing it's memory or not.
Generally writing to flash is more current related than voltage, but it does still require minimum voltages are met.

I am probably still going to try a higher powered hub and see what it does for my system, but I will put a big red MAY in the wiki where I recommend the high power USB hub as an alternative based on your feedback.

Basically I need to get rid of that miserable power hungry PPM-SUM encoder.

I think I am going to try my FLIP Sport as a PX4 based system with 3DR telemetry radio only and AndroPilot or Droid planner.

I know out of the frying pan and into the fire, but at least the FLIP is REALLY tough and my backyard is grass and soft dirt. (And I can run really fast).

Best Regards and thank you for your input,

Gary

Tom Coyle

unread,
Nov 9, 2013, 9:21:28 PM11/9/13
to drones-...@googlegroups.com
Hi Gary,
Thanks for the update on the USB port max current specs.
 
I originally thought that I had an insufficient current issue when I measured the GPS voltage of 3.96vdc when connected to an unpowered USB port.
 
However, after building my one of a kind 2 amp USB powered port and only getting 4.6vdc, I knew then that it was not an insufficient current issue dragging the voltage down at the GPS module.
 
Regards,
Tom C ArduRover2 Developer 

On Friday, November 8, 2013 3:28:24 PM UTC-5, Holger Steinhaus wrote:

Holger Steinhaus

unread,
Nov 24, 2013, 5:10:18 AM11/24/13
to drones-...@googlegroups.com
Just found out the real reason for the flash problems: a 3DR radio connected to UART5 makes the PX4IO update fail. Just disconnect the radio, and everything is fine.

Maybe we should add a hint into the Wiki.

Holger
Reply all
Reply to author
Forward
0 new messages