Bosch Sensortec Community

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

    BMX160 + BSXLite integration

    BMX160 + BSXLite integration

    jminack
    New Poster

    Hi,

    I am developing an application using a BMX160 and the BSXLite library.

    I've read the integration guide was wondering if anybody could clarify the following:

    1) Refering to the Table on page 7 of the guide (screen capture below) about the ODR settings, I am assume this is specifying the required configuration settings for each of the 3 sensors. Is that correct?

    2) I am really unclear about how often I need to feed the library data via the bsx_dostep call. Do I need to feed it at the ODR rate? That is, should I be calling this function at a rate of 100Hz to supply it the accelerometer and gyroscopic sensor?

    3) Table 4 on page 14 shows a list of support data rates (screen capture below). What does Output data rate actually mean in this context?

    4) Section 4 states "...The core & controllers should have sufficient resources (ROM/RAM) for library processing" but doesn't specify what they are. In particular, is there any indication what the stack requirements are?

    5) This has been asked before, but I can't seem to find an answer. For the arrays of values that are passed in via the bsx_init function, what do they mean? Does the BMX160 configuration need to match these values in some way?

     

    Thanks for any help.

    John

    DataRateTable.PNGODR.PNG

     

     

     

    5 REPLIES 5

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    (1) Yes, that is correct. BSXLite library supports ODRs for accel 50Hz, mag 20Hz and gyro 50Hz. So you need to configure BMX160 to match these ODRs.

    (2) There are two ways to call bsx_dostep function. One is enable BMX160 gyro data ready interrupt and map it to INT1 pin for example. Once your MCU receives the interrupt signal you can call bsx_dostep function. The other way is use your MCU timer interrupt. Every 20ms (50Hz) your MCU timer will generate an interrupt so that you can call bsx_dostep there. Because the ODR data ready interrupt has tolerance from sensor to sensor, MCU timer may be considered.

    (3) Output data rate (ODR) means the sensor internal sampling rate. BMX160 accel and gyro (IMU) inertial measurement unit are internally synchronized. At 50Hz ODR both accel and gyro will automatically update their data registers every 20ms. Mag is an I2C slave to the IMU inside BMX160. The IMU will configure the mag to work at 20Hz and then read and put mag data in BMX160 data registers. So if your MCU calls bsx_dostep function at 50Hz, then it will require sensor data first through I2C or SPI interface and then calculate the sensor fusion results such as quaternions, Euler angles, gravity vector and linear acceleration. Your MCU then will wait for the next timer interrupt to call bsx_dostep again.

    (4) Because BSXLite library needs to do sensors' calibrations and sensor fusion algorithms on the background, it requires your MCU to have sufficient RAM and ROM to hold the intermediate results and code size when compiling.

    (5) The arrays of values that are passed in via the bsx_init function include sensor sensitivities, axis remapping 3x3 matrix, soft-iron 3x3 matrix, etc. If the BMX160 on your PCB is soldered and aligned to your product body axes in different ways, then you can change the axis remapping 3x3 matrix in the array.

    Thanks.

    Firstly, thanks for your response. Some additional questions below.

    1) There are two tables in the document that refer to the ODR. The one of page 7,states an accelerometer ODR of 100Hz and the one on page 14 (captioned Table 4) says 50Hz.

    In the post shown here and the post shown here the listed code implies a ODR of 100Hz. Just to confirm: the accelerometer and gyro ODR should be 50Hz?

    For the mag, an ODR of 20Hz cannot be configured, only 25Hz. Is that acceptable?

    2) OK, thanks for answer.

    3) In the sample code the bmf055(file attached), see bmf055.cm bsx_lite_raw_feed() function call , it looks like the data is being fed in at a rate of 100Hz, not 50Hz.

    4) Understood. My specific question (Sorry, I was probably not clear) is about the stack usage, as there is no indication in the document as to what is required.

    5) OK, but, again, there is no description as to what each value does. When you say  "... you can change the axis remapping 3x3 matrix in the array.", which elements in the array need to be changed? And how?

    Regards

     

    John

     

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    We will get back to you soon.

    Thanks.

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your patience.

    The sensor ODR for BSXLite should be as shown below.

    image-2020-06-10-11-30-13-342.png

    And it has been confirmed working. About the "table4 - 50hz, 20hz, 50hz", it might be a typo in BSXLite.

    No stack information is collected in BSXLite. Sorry that BSXLite doesn't have axis remapping feature included. This means that you have to do the axis remapping on your firmware side and then feed the sensor data after remapping into BSXLite.

    Thanks.

    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