Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI270 Anymotion feature can not be enabled

    BMI270 Anymotion feature can not be enabled

    XudanMorris-Wei
    New Poster

    Hello there:

    I want to enable anymotion feature on BMI270 but not map to any physical interrupt pins. MCU checks the status by reading INT_STATUS0 every 1 second through SPI. I am expecting bit 6 of INT_STATUS set flag as I move the sensor, but the output is alwasy 0. Below is how I do it. 

    Procedure:

    1. Initialize BMI270 as performance opt mode with ODR as 25/8, and Power save mode;
    2. Enable INT_LATCH by setting it to 1;
    3. Set FEAT_PAGE to 1;
    4. Set ANYMOTION1 and ANYMOTION2 as 0xE005,  0Xb8AA (output to bit6, 5 samples, x, y, z enabled, 83mg )
    5. Write whole page values to FEATURES[0-15]
    6. Disable acc, gyro and temperature until main function.
    7. In the main function enable acc, gyro and temperature and read INT_STATUS0

    I am pasting the code screeshot of each steps

    Step 1: Initialization

    Step 6 see the last line of code in the step 1 picture.

    Step 7 read and display INT_STATUS

    4.png

    Couple note:

    • BMI270 is configured correct and config file is uploaded correctly. Acc and gyro is operation correctly. I can get the data out;
    • During initialization, I read the Feature 0 -15 and then write the value to them then read values again. However, the read after register writing dosent give correct values, shown as below 1, 2, 3 and red highlight.

     

    Appriciate your help. Thanks in advance. 

     

     

    4 REPLIES 4

    XudanMorris-Wei
    New Poster

    Here is the print out of note 2 metioned in the post, as only 3 pictures are allowed in one post

    2.png

    Hi,

    Please review the reference code in github, bmi270, any_motion_interrupt.c .

    Hi, I am facing a similar issue with BMI270.

    I am able to configure sensors and get acc and gyro data. after that, I configure the 0x2F with the value of 1. And then read to see the default value at 0x3C and 0x3E. and I get the value 0x0000. on checking all the addresses from 0x30-0x3F all show 0x00.

     

    Screen Shot 2022-05-23 at 3.30.20 PM.png

    BSTRobin
    Community Moderator
    Community Moderator

    Hi trailbee47,

    Suggest you directly use BMI270 sensor API and example code on github.
    https://github.com/BoschSensortec/BMI270-Sensor-API

    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