Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

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

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

    BobbyCannon
    Member

    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 : AXAXAYAYAZAZMXMXMYMYMZMZGXGXGYGYGZGZARARMRMR
    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

    BobbyCannon
    Member

    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?

    kgoveas
    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.

    Regards,

    kgoveas

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist