Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BMI270 Anymotion feature can not be enabled

    BMI270 Anymotion feature can not be enabled

    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. 


    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


    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

    New Poster

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



    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

    Community Moderator
    Community Moderator

    Hi trailbee47,

    Suggest you directly use BMI270 sensor API and example code on github.