Px4-autopilot: fmu_v5 NSH some commands force an instant reboot

Created on 26 May 2018  路  17Comments  路  Source: PX4/PX4-Autopilot

Certain NSH commands via QGC on Master and Beta send it to an instant reboot.

For instance ver all works fine, tests all, etc but any of the airspeed commands send it to a reboot. Plugged in directly via usb only and only one airspeed (sdp3x) at a time plugged in (to i2c a). Even with no airspeed plugged in it does the same thing, reboots.

bug fmu-v5

All 17 comments

@DanielePettenuzzo any ideas? All currently supported differential pressure sensors (airspeed) are i2c.

@ryanjAA how do you start the driver?
I start it like this:
sdp3x_airspeed start -b [bus-number]
for i2c-a the bus number should be 4.

@dagar some drivers don't have the argc check so if you just write the driver's name with no arguments there is a reboot.

I got ms4525 working on i2c-a on friday.

@DanielePettenuzzo That does it. Its the argc check. Using sdp3x_airspeed start -b works. Using sdp3x_airspeed start -b works, sdp3x_airspeed help works but just sdp3x_airspeed reboots it.

I guess that means a separate issue. That command doesnt reboot it but it also wont let the sdp3x start.

@ryanjAA if you connect the sensor to i2c-a and start the driver what message do you get on the console?
sdp3x_airspeed start -b 4

Two firmware flashs and all set. Maybe something lingering from whatever firmware was sent over on it? I was playing with some can units but it鈥檚 working now. If it happens again I won鈥檛 reflash. I鈥檒l keeep it and figure out why if it sticks but so far have several airspeed units working.

So I guess to close this then it鈥檚 the argc checks. Maybe we should get that in the docs or add them to all commands.

@ryanjAA for the px4 firmware are you using latest master?

@DanielePettenuzzo Yes. Latest master.

@bkueng Sounds like argc handling needs an audit.

@bkueng Sounds like argc handling needs an audit.

The driver boilerplate is all copypasta and would greatly benefit from ModuleBase or similar.

EDIT: one reason we haven't already started using ModuleBase for drivers is that we need to be able to start multiple instances. https://github.com/PX4/Firmware/issues/9143

@ryanjAA can you write down the affected commands so that we can fix them up quickly?
In the long run we'll need a ModuleBase for multi instances, but I have not come up with a good solution yet.

@bkueng I am out of the office for at least another week (no Pix 4 with me either) but so far the airspeed tests with no arguments were doing it. The ver command did not but it probably just needs someone to go through each one with out an argument to see what happens if no other way to check. I鈥檓 happy to do so but it won鈥檛 be possible for a week or so.

@ryanjAA I went through all commands and fixed the ones affected in #9589.

Hi,

seems like there are some untouched places where the issue isn't handled, such as https://github.com/PX4/Firmware/blob/27e75920bd560b7d8de295db45aba8cf036cd98d/src/drivers/imu/l3gd20/l3gd20.cpp#L1358

@garfieldG right, this driver is not enabled on Pixhawk 4. Fixed in #9647

Was this page helpful?
0 / 5 - 0 ratings

Related issues

huangwen0907 picture huangwen0907  路  3Comments

mwiatt picture mwiatt  路  5Comments

Stifael picture Stifael  路  3Comments

FaboNo picture FaboNo  路  5Comments

zhanghouxin07 picture zhanghouxin07  路  5Comments