Bosch Sensortec Community

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

    BHI160 sensor

    BHI160 sensor

    GMarco_Utech12
    Established Member

    Good afternoon, 

    We are development a firmware that communication with BHI160 sensor, but i dont understand which commands i send for obtain the accelerometer data with frequency 1600 Hz. Can you help me ? There is a library for utilize this sensor in C code ?

    Best regards

    5 REPLIES 5

    Reading Table 2, 3, and 4 describe the hardware of the Fusercore, BMI160 (accel) and BMI160 (Gyroscope) inside the package. The FuserCore draws 800uA when active, but there is no power mode where the core is always active. The same goes fo the accelerometer, it samples data at 1600Hz, but there are no power mode when you can get 1600Hz data continuously.

     

    You could however replace the code running on the fusercore to fill up the BMI160 1KB FIFO with 1600Hz data, then empty it and process it, but the CPU does not run fast enough to do this in real time, so you would end up with 1600Hz data periodically, but not continuously.

    Hope that clarifies the sample rate question. If you do need fast raw data, the Sensor Hub does not offer you any value, what you need is the BMI160 standalone IMU.

     


    @GMarco_Utech12 wrote:

    I2CReadBytes ( BHY_I2C_ADDR , VS_TYPE_ACCELEROMETER , 246 , &rawData [ 0 ] ) ;

    But the buffer rawData is empty, which commands i must send to read the FIFO buffer ? can you help me 


    This is not how data readout work in BHI160, please port the driver and sample code to your application. https://github.com/BoschSensortec/BHy1_driver_and_MCU_solution

    You need to first upload firmware to the sensor hub, enable virtual sensors, then proceed to empty the FIFO using the protocol outlined in the sample code. BHI160 does not have data registers, only FIFO.

     

    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