Bosch Sensortec Community

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

    BHI260 - Calibration State - BSX Algorithm Parameters

    BHI260 - Calibration State - BSX Algorithm Parameters

    btruden_henway
    Long-established Member

    Hi,

    I'm working with a BHI260 chip. As a host, I'm using an STM32L433 microcontroller. I don't use the BHY API on the host, I've written my own communication code.

    I've successfully uploaded the firmware to the BHI, and I'm also successfully getting the Gravity and Game Rotation Vector measurements at 25Hz.

    Now I want to get the calibration state of the accelerometer and the gyroscope. According to the datasheet, to get that information I have to send the Get Parameter Status Command (Section 13.3 in the datasheet) following the Host Command Protocol (Section 4.4 in the datasheet).

    The parameters that I have to read are 0x0201 and 0x0203 as shown below:

    btruden_henway_0-1645816890728.png

    As indicated in the 3rd column of the table, the accelerometer, and gyroscope content is returned inside a BSX State Exchange Structure. According to the datasheet, this is the format:

    btruden_henway_2-1645817629315.png

    So, If I send the Parameter Status Command [0x1201] (The first "1" of the 0x1201 os for indicating the "Read" operation) I should expect to get the calibration state value of the accelerometer within the Block data of the BSX State Exchange Structure sent by the BHI chip on the response of my command (taken from the Status and Debug FIFO).

    But unfortunately, in the datasheet, there's no definition of how's the data arranged within the Block data. So I don't know exactly which byte of the Block Data is telling me the calibration state of the accelerometer.

    Here I have the real measurements. I send the Parameter Status Command [0x1201] and I get the following data from the BHI chip:

    btruden_henway_1-1645820540077.png

    BlockData[0]:   0x1	
    BlockData[1]:   0x50	
    BlockData[2]:   0x0	
    BlockData[3]:   0x4	
    BlockData[4]:   0x7f	
    BlockData[5]:   0x90	
    BlockData[6]:   0x1	
    BlockData[7]:   0x40	
    BlockData[8]:   0x6	
    BlockData[9]:   0x0	
    BlockData[10]:  0x6f	
    BlockData[11]:  0x0	
    BlockData[12]:  0x0	
    BlockData[13]:  0x0	
    BlockData[14]:  0xff	
    BlockData[15]:  0x0	
    BlockData[16]:  0x0	
    BlockData[17]:  0x0	
    BlockData[18]:  0xb	
    BlockData[19]:  0x0	
    BlockData[20]:  0x10	
    BlockData[21]:  0x0	
    BlockData[22]:  0x0	
    BlockData[23]:  0x1	
    BlockData[24]:  0x0	
    BlockData[25]:  0x0	
    BlockData[26]:  0x0	
    BlockData[27]:  0x0	
    BlockData[28]:  0x0	
    BlockData[29]:  0x0	
    BlockData[30]:  0x0	
    BlockData[31]:  0x0	
    BlockData[32]:  0x0	
    BlockData[33]:  0x0	
    BlockData[34]:  0xb	
    BlockData[35]:  0x0	
    BlockData[36]:  0x8	
    BlockData[37]:  0x0	
    BlockData[38]:  0x0	
    BlockData[39]:  0x4	
    BlockData[40]:  0x0	
    BlockData[41]:  0x0	
    BlockData[42]:  0xb	
    BlockData[43]:  0x0	
    BlockData[44]:  0x58	
    BlockData[45]:  0x0	
    BlockData[46]:  0x0	
    BlockData[47]:  0x9	
    BlockData[48]:  0x0	
    BlockData[49]:  0x0	
    BlockData[50]:  0x0	
    BlockData[51]:  0x0	
    BlockData[52]:  0x0	
    BlockData[53]:  0x0	
    BlockData[54]:  0x0	
    BlockData[55]:  0x0	
    BlockData[56]:  0x0	
    BlockData[57]:  0x0	
    BlockData[58]:  0x0	
    BlockData[59]:  0x0		
    BlockData[60]:  0x0		
    BlockData[61]:  0x0		
    BlockData[62]:  0x0		
    BlockData[63]:  0x0

     

    Which of the Block Data bytes (0 to 63) contains the accelerometer calibration state?

    Thanks!

    7 REPLIES 7

    Hello btruden_henway,

    I know that what you want to do. But the calibration state and SIC matrix use a BSX internal binary data format and are not intended to be interpreted by the host.

    noe for calibratio status.png

    Normally, the following are general usage methods:

    1. Calibrate sensors(accel, gyro, mag) until the accuracy of all sensors is 3;

    2.get sensor calibration status;

    3.set sensor calibration.

    In fact, you don't have to care about the content of calibration profile, just need to care about get and set.

    btruden_henway
    Long-established Member

    Hi BSTRobin,

    Thank you for your reply.

    I understand now.

    My goal is to get the calibration status of each sensor without having to wait for the Sensor Status meta event. Maybe there was some way of asking the chip the actual calibration status of each sensor. But I see now that there's no way of doing that in the BHI260AB.

    I thought that by getting the calibration profile from the BSX Algorithm Parameters I was able to get the calibration status of the sensors (the one that is reported as a number 0-3 in the Sensor Status Meta Event).

    BR

    Hello btruden_henway,

    The content of alibration profile was not opened.

    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