Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMA222E False interrupt after initialisation.

    BMA222E False interrupt after initialisation.

    Puneeth
    New Poster

    Hi,

    I am using  BMA222E Accelerometer for motion detection in one of our project.I2C communication is used.
    Intention behind the Accelerometer usage is only for motion detection.
    Below are the set of registers used for device Initialization.

    ((0x11), 0x00);
    ((0x14), (0xB6));
    Waitms(3); //wait for 3 milli seconds
    ((0x19), 0x00);
    ((0x24),0x00);
    Waitms(5); //wait for 5 milli seconds
    ((0x10), (0x0E));
    ((0x13),(0x40));
    ((0x25),0x04);
    ((0x0F), (0x03));
    ((0x26),0x48);
    ((0x36),((0x01)|(0x02)|(0x04)));
    ((0x17), ((0x01)|(0x02)|(0x04)));
    ((0x11),((0x40)|(0x1A)));
    ((0x19), (0x02));
    Waitus(500); //wait for 500 micro seconds
    ((0x24),0x40);
    Waitus(500); //wait for 500 micro seconds
    U8 tLowPowerReg = (U8)(read((0x11))); //read the register content
    tLowPowerReg &= ~(0x80);
    tLowPowerReg |= (0x40);
    Waitus(500); //wait for 500 micro seconds
    ((0x11), tLowPowerReg);
    Waitus(500); //wait for 500 micro seconds
    After the above initialization part, Accelerometer is raising an interrupt even the chip is stand still without any motion and state of the interrupt pin will high for at least 200ms and after it is cleared. This behavior is seen consistently.
    I have no idea to avoid the false interrupt which is getting immediately after the device initialization.
    Could you please correct me what is wrong in my initialization part.

     

    3 REPLIES 3

    Vincent
    Community Moderator
    Community Moderator

    I tried your register setting on my platform,  i didn't see a INT change during initialize.

    Actually you write 0x11 to 0x5A which is arleady set sensor to low power mode. 

    then you read out 0x11 and set bit 6 to 1 means set to low power mode again,  i don't see the INT jump here on my side.

     

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Sorry for the late response. Please see the comments below in red color.

    ((0x11), 0x00);  // set BMA222E to normal mode
    ((0x14), (0xB6));  // soft reset BMA222E to default values
    Waitms(3); //wait for 3 milli seconds
    ((0x19), 0x00);  // default value
    ((0x24),0x00);  // default value
    Waitms(5); //wait for 5 milli seconds
    ((0x10), (0x0E));  // set BMA222E to 500Hz BW or 1KHz ODR
    ((0x13),(0x40));  // should be default value 0x00 that enables the shadowing mechanism. Therefore, you will not get mixed high byte or low byte of each axis from different consecutive samples.
    ((0x25),0x04);  // 10ms high-g duration
    ((0x0F), (0x03));  // default value for +/-2g full scale range
    ((0x26),0x48);  // 562mg high-g threshold
    ((0x36),((0x01)|(0x02)|(0x04)));  // high-pass filter enabled, at any position stationary x/y/z axes data will show 0g
    ((0x17), ((0x01)|(0x02)|(0x04)));  // enable high-g interrupt for x/y/z axes
    ((0x11),((0x40)|(0x1A)));  // set sleep time to 100ms low power mode 1. The final ODR will be around 9Hz.
    ((0x19), (0x02));  // map high-g interrupt to INT1 pin
    Waitus(500); //wait for 500 micro seconds
    ((0x24),0x40);  // set 125mg high-g hysteresis
    Waitus(500); //wait for 500 micro seconds
    U8 tLowPowerReg = (U8)(read((0x11))); //read the register content
    tLowPowerReg &= ~(0x80);
    tLowPowerReg |= (0x40);
    Waitus(500); //wait for 500 micro seconds
    ((0x11), tLowPowerReg);
    Waitus(500); //wait for 500 micro seconds  // the above is still writing value of 0x5A to register 0x11.

    Anyway, the above initialization should work fine. When stationary there should be no interrupt generated. Only when motion is applied, the interrupt will be generated. Please refer to the attached document for more information.

     

    Hi , 

    Thanks for the response.

    I think , I put my question in wrong way. 

    My question is, Actullay remote will not give any false interrupt after intilization is done .

    I am seeing false interrupt during Intilization or just after few ms from the time  of Intilization is completed.

    During Intilization , the device is stand still and there is no motion at all.

     

    Regards,

    Puneeth

    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