Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BHI260AP Unexpected reply FIFO Data output

    BHI260AP Unexpected reply FIFO Data output

    Krippkrupp
    New Poster

    I'm talking of Host Interface from a STM32 to the BHI260AP on a Shuttleboard v.3.

    I follow the steps in the datasheet to load and boot the firmware.
    The Boot Status register (0x25) indicates that everything is fine - Though both the bits Firmware Verified and Firmware Verify Error seem to be serve more of a decorative function rather than actually convaying conveying any message.

    The firmware that I use, was grabbed from Github, Bosch_APP30_SHUTTLE_BHI260.fw.h.

    When setting my virtual sensor (0x000D) to, for example Game Rotation Vector (0x26) on Wake-up, to Host Channel 0 - Command Input (0x00) I stumble on the following issue

    Krippkrupp_0-1660930382329.png

    Sample Rate, floating point sample rate in Hz. Should I use the IEEE 754 floating point standard? Also from time to time they skip around between LSByte and MSByte first (though they actually write LSB first and MSB first - which I assume is one of many mistakes in the datasheet?)

    So for example, I'll send [0x00 0x0D 0x00 0x08 0x00  0x00 0x00 0x80 0x3f 0x00 0x00 0x00]
    I.e sample rate 1 Hz and latency 0.

    When clearing the FIFO by reading it, I get the following

    Krippkrupp_1-1660930668053.png

    As I'm not sure how many bytes Meta Event should be, I can't get it to fit the FIFO data packet. The datasheet says that Meta Event for Wake-Up FIFO should be 2 bytes, though slightly down in the same paragraph they mention 4 bytes, so who knows. I did check the table for Meta Event, page 173 Table 99. However I can't for my life figure out what information I'm supposed to take from this.
    Below the table they do give some descriptions.


    15.3.8 Meta Event: FIFO Overflow
    This Meta Event indicates when data loss has occured [..]. Bytes 2 and 3 report a saturating count of lost bytes

    Do they mean the second and third byte of the Meta Event or the entire FIFO output?

    15.3.15 Meta Event: Spacer
    This Meta Event is used to maintain a fixed size for the FIFO block header.

    Some information like what the spacer would have looked like would have been fine. Is it 0x00's? Is it 0xff's? Or does the spacer just spout out any odd number it have laying around? 


    Either way, maybe I shouldn't care about this?

    After setting the virtual sensor, my interrupt pin goes high. Reading the FIFO again, I get the following.

    Krippkrupp_2-1660930855644.png

    Though I have the same issue here. No matter if I use 2 or 4 bytes in  Meta Event, I can't get 0x26 to fit in the correct place for the sensor ID.

    Since I've followed the steps from the datasheet on page 36, I don't believe that I've missed any big steps. However I am curious about the Firmware. As mentioned earlier, the two bytes Firmware Verified and Firmware Verify Error are both as they should be. Though if I change the firmware that I upload - to nonsense - I still get Firmware Verified and no Firmware Verify Error. Is there a real way to check the the FW loaded and booted successfully?

    Any ideas? 

    Thanks in advance!

     

     

    1 REPLY 1

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Krippkrupp,

    Do you only use 6 axis as you used firmware "Bosch_APP30_SHUTTLE_BHI260.fw.h"?
    You could use BHI260 sensor API and example code on github https://github.com/BoschSensortec/BHY2-Sensor-API, run and test it again.

    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