Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BNO055 - Cannot restore calibration, only MZ is not restoring...

    BNO055 - Cannot restore calibration, only MZ is not restoring...


    I am using the BNO055 sensor and I cannot seem to get the calibration to restore for Magnetometer MZ.

    Here is how I get the calibration registers

    • start up the unit, put in fusion mode NDOF
    • loop until all configurations == 3
      • if (calibration.Sys == 3 && calibration.Acc == 3 && calibration.Gyro == 3 && calibration.Mag == 3)
    • read the calibration registers
      • put into configuration mode
        • WriteData(BNO055_ADDRESS, BNO055_REGISTER_OPR_MODE, 0b0000); // Configuration Mode
        • Delay 20 ms
      • ReadData(BNO055_ADDRESS, BNO055_REGISTER_ACC_OFFSET_X, &Settings.BNO055Calibration.Values[0], 22);
    • save our settings into our EEPROM


    On boot we restore it by...

    • read data from eeprom
    • put in configuration mode
      • WriteData(BNO055_ADDRESS, BNO055_REGISTER_OPR_MODE, 0b0000); // Configuration Mode
      • Delay 20 ms
    • WriteData(BNO055_ADDRESS, BNO055_REGISTER_ACC_OFFSET_X, &Settings.BNO055Calibration.Values[0], 22);
    • Read configuration and it's in an error state


    Here is what is actually happening...

    COM14: BNO055: Switching to Page 0
    COM14: Calibration : 0, 0, 0, 0
    COM14: System Status : System Idle
    COM14: System Error : No Error
    COM14: Restoring calibration values
    COM14: Writing :  0 1 2 3 4 5 6 7 8 9101112131415161718192021
    COM14: Writing : 0500E7FFD3FF83F5360E8C21FFFF0000FEFFE8036E03
    COM14: Read    : 0500E7FFD3FF83F5360E0000FFFF0000FEFF00006E03
    COM14: Calibration : 0, 0, 0, 0
    COM14: System Status : System Error
    COM14: System Error : Fusion algorithm configuration error

    Notice the MZ (10-11/ 0x5F-0x60) offset is 8C21 however it for some reason will not be written.

    Why not? All other registers are being written. I have tried single register writes by writing each register (0x55-0x6A) individually or in one mass write of 22 bytes. Both way will not write MAG_OFFSET_Z_LSB : 0x5F / MAG_OFFSET_Z_MSB : 0x60

    4 REPLIES 4


    I found BNO055_SIC_MATRIX_0 in the driver but it's listed as reserved 0x43-0x54. I tried to also save the SIC (soft iron calibration) and restore it with the other calibration values but that did not change the fact that MZ (0x5F/0x60) will not write.

    0x8C21 <- is not a valid value. This value is 8,648 decimal. The datasheet says the range of the magnetometer offset is +/- 6400 in LSB. I found that I can write 6400 without error but when writing 6401 (or anything higher) I get a system status or "System Error" and a system error of "Fusion algorithm configuration error".

    Question is this... "How can the self calibration process of the NDOF mode write a value that is outside the minimum / maximum range?"

    No updates? Does Bosch monitor this forum?

    Community Moderator
    Community Moderator

    Hi BobbyCannon,

    If a powerful magnet is mounted closeby to the BNO055, one can observe that the returned offset values are greater than 6400LSB as mentioned by you in an earlier post. The reason why the BNO055 does not accept these values back is to be investigated. Your query has been forwarded to our team but apart from confirming what you already know, there is no more information at this point of time.