Bosch Sensortec Community

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

    BHI260AB calibration

    BHI260AB calibration

    Gideon
    Long-established Member

    Hello,

    I want to know the way how to calibration all of the sensors(acc, gyro, mag) in BHI260AB.

    1. If you have any guide documents for it, please let me get them.

    2. "bhy2_set_calibration_profile", Do I have to use this for calibration? Then, let me get an example to do it.

    3. In the Development Desktop 2.0, there is a "sensor status", but no changes. How do I see it?

    Best Regards,

     

    11 REPLIES 11

    Hello, 

     

    You can register meta event and each sensor ID using our API. 

    https://github.com/BoschSensortec/BHY2-Sensor-API

    And, especially for accel and gyro status, you always can get accuracy data when you get accel or Gyro data. 

    Please check bhy2_register_fifo_parse_callback in our example code. 

    When you register sensor ID, you just register accuracy as well as below.


    rslt = bhy2_register_fifo_parse_callback(EULER_SENSOR_ID, parse_euler, (void*)&accuracy, &bhy2);

     

    Please let me know if you have any question. 

    Thank you. 

    btruden_henway
    Long-established Member

    Hi Minhwan,

    I've visited the API site you shared, but the function you mention doesn't seem to give accuracy information:

    btruden_henway_0-1645095875554.png

    You mention that the 3rd parameter of the function bhy2_register_fifo_parse_callback is (void*)&accuracy. But in the API the 3rd parameter of that function is void *callback_ref: "Reference needed inside the callback function. Can be NULL".

    But, since in my application I created the communication interface between my MCU and the BHI chip (I don't use the API), could you please let me know where in the datasheet says that the accel/gyro calibration status can be asked?

    Thanks!

    Hi, 

     

    Let me explain based on euler example. 

    https://github.com/BoschSensortec/BHY2-Sensor-API/blob/master/examples/euler/euler.c

    First, you need to register your sensor with accuracy. 

    rslt = bhy2_register_fifo_parse_callback(EULER_SENSOR_ID, parse_euler, (void*)&accuracy, &bhy2);

     

    Then, when parse_euler is called, accuracy is updated. Please check parse_euler function. 

    Thank you. 

    btruden_henway
    Long-established Member

    Hi Minhwan,

    I understand the example now. Thanks. 

    However, the API does the same as I'm doing. It registers any new "Sensor Status" meta event and stores the last accuracy value. But this information is taken from the BHI chip if the accuracy value changes. There seems to be no way to ask the chip for the accuracy status.

    Here's my question again:

    Is there some way to ask the BHI chip for the current accuracy status of a certain virtual sensor instead of waiting for the accuracy change event? Forget about the bhy2 API, now talking on the datasheet/chip level.

    BR

     

    Hi Minhwan, 

    I found it:

    btruden_henway_0-1645122747556.png

    Thanks

    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