-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
ICM20948 in HERE 2 is not detected #11230
Comments
I've also tried flashing Ardupilot firmware and there it's working.
|
@krevne I don't have a Here 2 GNSS at hand so I can't reproduce. in main.cpp line 139? |
@flochir Unfortunately this didn't work. |
@krevne @mhkabir
This explains why the Ardupilot driver works - it's only meant for the magnetometer and only configures ICM20948 to put the mag through on I2C. And it's able to work with a standalone AK09916, while the MPU9250 driver as of now is only meant to talk to a whole ICM20948 (but also support the whole IMU). My guess is that the main I2C interface of ICM20948 in Here 2 is connected to the integrated microcontroller (which will handle the CAN interface later), while on the external I2C of the Pixhawk only the AK09916 is attached, connected through AUX_CL and AUX_DA of ICM20948. This means that support for a standalone AK09916 is needed. Can you give some deeper PX4 driver philosophy on how best to do this @dagar @DanielePettenuzzo? Also not sure when I'll be able to pick that up, could take a bit. If anyone else does, please give me a note. |
The Here 2 MCU acts as an I2C slave and emulates an AK09916 and a Toshiba LED. So functionally yes, it shows up as a "naked" ak09916 on the I2C bus. |
@jschall Thanks for the information! |
@jschall Do you maybe have a link or document with more background information on the Here 2? |
@flochir I found your PR adding ICM20948 support to PX4(#10116. Does the "mag only" mode allow communication to the HERE2's emulated AK09916 mag? Or is there still an addressing problem? Do you know if there are plans to support this? We'd like to use the HERE2 and HERE2+ but not having the external mag is a problem. Thanks! |
@jzazbert The mag only does not support a standalone AK09916. It just does not register the accel/gyro sensors of an ICM20948 if you just want to use it as an external magnetometer, e.g. in the Here GNSS. I want to try to create a standalone driver for AK09916 eventually, but I'm short on time for this right now. I don't know of anyone else working on this, either. If you want you can take a look at #9345. I implemented a standalone AK09916 driver there that was mostly working, but not yet finished. We implemented ICM20948 support in the MPU9250 driver instead. |
Anybody working on this? @flochir If you can point me to your previous impl for AK09916 I'll reserve some time to look into it. |
Does anyone know the current state of CAN support on the Here 2? Going straight to CAN might be more worthwhile. |
We have a working driver that Proficnc helped us write for HERE2, on a private repo. I'll share but I don't currently have time to do a PR for it. I'd be happy to provide to someone to add. As for CAN support, there is engineering firmware available that has been provided to us that did work with PX4 though UAVCAN and the other cable supplied with HERE2. You'd need to contact proficnc to get it. We had to use an external CAN tool to update the firmware but then it worked with PX4. This was not extensively tested. |
What Jzazbert said... Please give a couple of days for the firmware to show up. A PR for the i2c driver would be awesome! |
@proficnc Does the Here2 not support the standard UAVCAN firmware update protocol? |
@AndreasAntener |
I've uploaded our driver as the following commit, based off PX4 1.8.2 stable tag. We have probably 100 flight hours on this driver on 5 different aircraft and haven't had any issues to date. Some caveats:
Thanks for the support upstreaming this! |
The other part of CAN support to check is the safety button and led. |
@AndreasAntener looks like it ;) @dagar Do you think it would make sense to port the mpu9250 driver to the new driver model? Would that potentially reduce the boilerplate code enough to make it worthwhile tearing it apart into an mpu9250, icm20948, mpu6500, ak09916 and ak8963 driver? |
@bugoblitorator |
@flochir here is a working branch on top of current stable for your reference, https://github.com/bugobliterator/PX4Firmware/tree/pr-v1.8.2-ak09916 . |
Thanks guys, on this now. |
@proficnc what is the emulated orientation on the Here2? |
I'm using Pixhawk4, also get this message #11748 |
Support for the compass in the Here 2 GPS is now in master. 95a0803 |
Thanks @AndreasAntener |
Was compass calibration tested without a HERE2 plugged in, but the driver enabled? I had some trouble on the earlier version of this driver where QGC would spit out an error about magnetometer 3081 not being found and aborting compass cal. |
Describe the bug
The ICM20948 in the HERE 2 from ProfiCNC is not detected. WHOAMI value 0x00 is read.
To Reproduce
Steps to reproduce the behavior:
WARN [mpu9250] no device on bus 2
I've added a few lines of debug code and have figured out that the WHOAMI value is returned as 0x00
The text was updated successfully, but these errors were encountered: