Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixhawk/PX4FMUv2 startup without external mag fails #9061

Closed
philipoe opened this issue Mar 12, 2018 · 4 comments
Closed

Pixhawk/PX4FMUv2 startup without external mag fails #9061

philipoe opened this issue Mar 12, 2018 · 4 comments

Comments

@philipoe
Copy link
Contributor

philipoe commented Mar 12, 2018

Bug Report

Issue:

On Pixhawk with rev. 3 microprocessor (i.e. compiled via px4fmu-v3_default), current master firmware (63121b7) and stock startup script (rcS with airframe "standard plane" / Autostart ID 2100), bootup without an external magnetometer does not work because lsm303d fails. The system is a 64bit Ubuntu 16.10LTS. The exact log output for the configuration is:

HW arch: PX4FMU_V2
HW type: V2
HW version: 0x0009000B
HW revision: 0x00000000
FW git-hash: 63121b7
FW version: 1.7.3 0 (17236736)
OS: NuttX
OS version: Release 7.22.0 (118882559)
OS git-hash: efc3d9e92bd10623ab3025f012fd7d481e1a7267
Build datetime: Mar 12 2018 13:40:08
Build uri: localhost
Toolchain: GNU GCC, 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
MFGUID: 393839343335511000380045
MCU: STM32F42x, rev. 3
UID: 380045:33355110:39383934

Steps to reproduce the problem:

  • By default, l3gd20 will start but lsm303d will not start because it is not part of the px4fmu-v3_default config file. The console output is as simple as "lsm303d: Command not found".
  • When just adding drivers/imu/lsm303d to cmake/configs/nuttx_px4fmu-v3_default.cmake, suddenly neither l3gd20 nor lsm303d start up anymore after a power cycle. Console output is:

INFO [mpu6000] accel cutoff set to 30.00 Hz
INFO [mpu6000] gyro cutoff set to 30.00 Hz
WARN [mpu6000] no device on bus #5 (SPI4)
WARN [mpu9250] probe failed! 104
WARN [mpu9250] no device on bus 3
WARN [mpu9250] probe failed! 255
WARN [mpu9250] no device on bus 4
ERROR [l3gd20] driver start failed
WARN [lsm303d] SPI init failed
ERROR [lsm303d] driver start failed

However, when doing a soft reboot (via nsh reboot command), both sensors start up correctly!

Questions:

I know that it is preferred to use an external mag, but why is lsm303d completely disabled in nuttx_px4fmu-v3_default.cmake ? And why does it not start after a power cycle (the pixhawks were supplied via either an external power supply or the USB port, but the issue remained the same) although it does start after nsh's reboot?

Notes:

This was tested on 3 different Pixhawks, all with revision 3 microprocessors and thus 2MB flash (on the PCB, these are just marked as "PX4FMU 2.4"). Same issue on all of them. However, on a fourth Pixhawk (which also has a rev. 3 microprocessor) this works every time (PCB mark is "PX4FMU 2.4.6", could be an mRo Pixhawk)! Is this a known problem of some hardware versions of Pixhawk?

@dagar @ASM3

@tops4u
Copy link
Contributor

tops4u commented Mar 12, 2018

Check current Master (IMHO the above is not current Master), since there was a Fix for SPI Bus Reset, which fixes the LSM303D not found after a Soft Reboot (Warm Start): #8992

@philipoe
Copy link
Contributor Author

The "above" (63121b7) is the current master as of right now, and the issue unfortunately persists.

@LorenzMeier
Copy link
Member

@philipoe Another fix went into master from @dagar - could you re-test?

@philipoe
Copy link
Contributor Author

Tested on 2 different Pixhawk units during ~10 hard-reboots, worked every time.

Thanks @dagar for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants