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.
... View more