Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BHI260 Fifo Overflow

    BHI260 Fifo Overflow

    Established Member

    Hello, the title is quite self explanatory, but here is the story.

    I am reading quaternion data from a BHI260+BMM150 using I2C at 400 Hz, along with Accelerometer and Gyroscope WU. Yet I'm reading every now and then a FIFO overflow with some seconds of data loss.

    Why is that happening? The while(true) loop is basically empty, I only have a led toggling and the BHI reading. Even if I flush the FIFO before the get_and_process, I will overflow it just after the flush. How is that I'm not able to empty the FIFO fast enough?

    I'm using an NRF5340 as a host microcontroller.

    6 REPLIES 6

    Community Moderator
    Community Moderator

    Yes, the structure is exacly the same. The only thing is that I enabled not Euler, but Quaternion, Gyro and Acc as sensors.

    It seems that I just that it takes too much time to print everything that I'm parsing, so that the next call to the get_and_process has too much to process, eventually overflowing the FIFO. But that's just my guess, I have no clue of what I can do

    Hi dariosortino,

    You can turn off some unnecessary print information to save time consumption of MCU. If FIFO overflow occurs when print is rare, you need to check whether the printing speed is too slow.

    Without printing anything, it takes 10 to 100 ms for the function bhy2_get_and_process_fifo to end.

    Consider that I set 3 sensors at 100 Hz each (ideally I would run at 400 Hz).

    My goal is to just have the latest sample available for my 3 sensors whenever I issue a command (I guess with bhy2_get_and_process_fifo).