Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BMI270 Anymotion feature can not be enabled

    New Poster

    BMI270 Anymotion feature can not be enabled

    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. 



    2 REPLIES 2
    New Poster

    Re: BMI270 Anymotion feature can not be enabled

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


    Community Moderator

    Re: BMI270 Anymotion feature can not be enabled


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