Bosch Sensortec Community

    SOLVED

    BHI160 sensor

    Highlighted
    Established Member

    BHI160 sensor

    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

    Tags (1)
    5 REPLIES 5
    Highlighted
    Community Moderator
    Community Moderator

    Re: BHI160 sensor

    See the BHI160 driver here: https://github.com/BoschSensortec/BHy1_driver_and_MCU_solution

     

    But unfortunately the maximum data rate is 200Hz

    Highlighted
    Established Member

    Re: BHI160 sensor

    Are you confirm me that it's not possible receive data from the Accelerometer with frequency of 1600 Hz  ?

    Is necessary manage the FIFO buffer as in the example for read data to accelerometer ? or can i read the data directamente without manage the FIFO buffer with this functions under ?

    bhy_read_fifo(fifo + bytes_left_in_fifo, FIFO_SIZE - bytes_left_in_fifo, &bytes_read, &bytes_remaining); 

    .....

    result = bhy_parse_next_fifo_packet(&fifoptr, &bytes_read, &fifo_packet, &packet_type);

    ...

    Best regards

    Highlighted
    Community Moderator
    Community Moderator

    Re: BHI160 sensor

    The issue is not the FIFO. BHI160 has a very large and fast FIFO and could stream a large quantity of data, the issue is the rate.

     

    It is a limitation of this architecture that the FuserCore (generation 1) cannot run at more than 200Hz output data rate. The next generation BHI260 will have a turbo mode increasing the clock speed of the FuserCore(generation 2) which allows up to 800Hz data rate at the expense of current consumption.

    Highlighted
    Established Member

    Re: BHI160 sensor

    Ok, but in the page 9 from the BST-BHI160-DS000-pdf manual (attached), i have read that max ODR is 1600 Hz  on table 3, why ?

    Sorry but i not understand as receive data from the accelerometer, i sending the follow commands sequence:

    - BHY_REG_PRODUCT_ID_ADDR

    - VS_TYPE_ACCELEROMETER ( 0x01 ) :

    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 ?

    Best regards

     

    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