Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BHI160 sensor

    BHI160 sensor

    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.

    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.