Bosch Sensortec Community

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

    Any motion interrupt configuration for BMI270 with Teensy 3.2.

    Any motion interrupt configuration for BMI270 with Teensy 3.2.

    paraas
    Member

    Hello,

    I'm trying to set up the any motion feature for the BMI270. The sensor is set up correctly and I can read data from the accelerometer and gyroscope.  I added the any motion feature to the struct used for the bmi2_set_sensor_config function in the API.  There are no errors, but the hardware interrupt never triggers. I tried reading the INT_STATUS_0 register, and it did set the corresponding bit high at some point. But I made some changed since then, and it's not working anymore. I'm not sure how to get to that point again. 

    I attached the functions used for the sensor configuration. The read/write functions etc. all work as desired.

    Thanks in advance 🙂

    Paraas

    4 REPLIES 4

    Minhwan
    Community Moderator
    Community Moderator

    Hello paraas, 

     

    I think you missed interrupt map. 🙂 

    I attached my example for any motion feature. 

    As you also use API, so you can easily apply it. 

    Please check below functions in my code 🙂

    "/* Enable the selected sensors. */
    rslt = bmi2_sensor_enable(sens_list, 2, &bmi2_dev);

    /* Set feature configurations for any-motion. */
    rslt = set_feature_config(&bmi2_dev);

    /* Map the feature interrupt for any-motion. */
    rslt = bmi2_map_feat_int(&sens_int, 1, &bmi2_dev);

    "

    Please let me know if you have further questions 🙂 

    Thank you. 

     

    Minhwan Oh

    Hello again Minhwan,

    Thanks for the quick reply. 🙂

    I have the bmi2_map_feat_int function at the end of the bmi2_accel_gyro_set_config, which is called in the IMU_init. Are there any functions in the API which can cause a conflict with the mapping function? 
    I tried uploading your example, but it's not initializiting correctly.  Had to change from SPI to I2C communication, since my SPI bus is full with other sensor data.  I've attached the modified version of your example, are you willing to check if I've missed something?

    Best regard

    Paraas

    Minhwan
    Community Moderator
    Community Moderator

    Hello paraas, 

     

    Could you please let me know when you have some error? 

    There is rslt value and you can find it where is problem 🙂 

    Thanks, 

    Hello again,

    Sorry I haven't replied until now. We decided not to use the anymotion feature for our design anyways. Thanks for the help 🙂

    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