Page 1 of 1

[SOLVED] Firmware not support Magnetometer on 9-axis MPU9250

Posted: Sat Jan 10, 2015 9:40 am
by lxrocks
The latest Crazyflie firmware appears to use Honeywell HMC5883L driver hmc5883l.c to get the Magnetometer x,y,z data. The MPU9250 contains an AK8963 chip not a HMC5893L chip. I thought perhaps the register addressing and control are the same but they are not. For example hmc5883l uses address 05h & 06h for Z-axis MSB/LSB values which on the AK8963 chip addresses the Y-axis. Some of the other register addressing don't match , so clearly the magnetometer code in the firmware does not work.

Re: Firmware does not support Magnetometer on 9-axis MPU9250

Posted: Mon Jan 12, 2015 1:43 pm
by tobias
I don't think you are looking on the right branch? As the Crazyflie 1 and 2 firmwares aren't compatible yet the Crazyflie 2 firmware is in the crazyflie2 branch. Here you can find the AK8963 driver.

Re: Firmware does not support Magnetometer on 9-axis MPU9250

Posted: Tue Jan 13, 2015 8:08 pm
by lxrocks
Thanks Tobias,

It makes sense now. I cloned what I thought was the CF2 firmware but my Git skills are lacking and did not add -b crazyflie2 to the clone command :D


eg

Code: Select all

git clone -b crazyflie2 https://github.com/bitcraze/crazyflie-firmware.git
Thanks

Re: [SOLVED] Firmware not support Magnetometer on 9-axis MPU

Posted: Wed Jan 14, 2015 9:24 am
by Torsten
just for completeness:

Once cloned, you can switch between branches back and forth with:

Code: Select all

git checkout crazyflie2
and

Code: Select all

git checkout master
A simple

Code: Select all

git pull
will bring your clone to the newest state.

Re: [SOLVED] Firmware not support Magnetometer on 9-axis MPU

Posted: Fri Jan 16, 2015 2:59 am
by lxrocks
Until recently the only Git command I have run was clone. So you have probably quadrupled my Git skills now :)

Info is much appreciated.
thanks