Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI270 Output data rate and interrupts

    BMI270 Output data rate and interrupts

    punitjain8695
    Member

    Hello

    I'm using a BMI270 shuttle board, and I want to get the accelerometer and gyroscope values at the maximum ODR possible, that is 1600Hz.

    I'm using the board via the SPI bus, using the BMI270 API https://github.com/BoschSensortec/BMI270-Sensor-API on github. I have set the registers for PWR_CTRL, ACC_CONF, GYR CONF and PWR_CONF for performance mode as said on page 20 of the datasheet.

    I have also setup a data ready interrupt on the INT1 pin, by modifying the registers: INT_MAP_DATA, INT_IO_CTRL, and INT_LATCH.

    The interrupts that I'm receiving on the microcontroller are always at 5ms interval (200 Hz) irrespective of the acc_odr values set in the ACC_CONF register for the accelerometer and correspondingly for gyroscope.

    Am I missing something? or some step.

    Please guide.

    P.S: I'm using TI's TM4C1294NCPDT based eval board.

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hello punitjain8695 ,

    If you used 1600 Hz ODR and data ready interrupt, an interrupt will be triggered every 625uS. This requires MCU to respond to interrupts very quickly. The interrupt service program is called very frequently, which increases the load of MCU. A better way is to read data with FIFO watermark interrupt.

    There was BMI270 FIFO watermark interrupt example code for your reference.

    https://github.com/BoschSensortec/BMI270-Sensor-API/tree/master/examples/bmi270/fifo_watermark_heade...

    625 us is fine for me. The problem right now is, I want it to happen. I'm checking the interrupts on an oscilloscope right now, and I'm not understanding why it's not happening.

    I'll take a look at the FIFO example. I want to do very fixed rate, synchronous measurements along with some other sensors in the system, and thus, I think maybe reading individual samples is better than the FIFO thing.

    Edit 1: Can you please let me know why I'm not getting data ready interrupt at 625us even when I configure it to be. Also, it's staying at 5ms interval no matter what ODR I program it for. even lower ODR like 25Hz.

    Edit 2: Okay, I figured out the problem with the configuration bits. I'm now able to get interrupts properly. I still want to know if I could actually do it using the FIFO, but still have some sort of time stamps, and synchronize with the other sensors in time domain.

    I checked it with the microcontroller only reading the values without any interruption. The values are changing only after 5ms. I don't think the BMI270 has been configured correctly.

    Hello punitjain8695 ,

    Edit 1: You can use an oscilloscope to measure the interrupt signal instead of MCU;
    Edit 2: For your application, it's better to use FIFO watermark interrupt.
    "I checked it with the microcontroller only reading the values without any interruption", by the way, after you have configured, can you print out all the registers to check whether the configuration is correct?

    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