LIS3DH output register value less than the set threshold
I use the lis3dh sensor to communicate through SPI, and the sensor settings are as follows:
lis3dh_gvWriteReg(LIS3DH_CTRL_REG0,0x90);
lis3dh_gvWriteReg(LIS3DH_CTRL_REG1,0x37);
lis3dh_gvWriteReg(LIS3DH_CTRL_REG2,0x00);
lis3dh_gvWriteReg(LIS3DH_CTRL_REG3,0x40);
lis3dh_gvWriteReg(LIS3DH_CTRL_REG4,0x30);
lis3dh_gvWriteReg(LIS3DH_CTRL_REG5,0x00);
lis3dh_gvWriteReg(LIS3DH_CTRL_REG6,0x00);
lis3dh_gvWriteReg(LIS3DH_INT1_THS,30);
lis3dh_gvWriteReg(LIS3DH_INT1_DURATION,0);
lis3dh_gvWriteReg(LIS3DH_INT1_CFG,0x2a);
Question 1:
The read acceleration value is less than the set threshold, and an interrupt occurs when it exceeds the threshold。why?
Question 2:
Why can a slight tap on the sensor detect an acceleration of 12 grams?
Question 3:
Is the conversion to acceleration values correct?
lis3dh_gvReadReg(LIS3DH_OUT_X_L, &val[0]); //28
lis3dh_gvReadReg(LIS3DH_OUT_X_H, &val[1]);
*p_x = val[0] | (val[1] << 8);
*p_x >>= 6;
*p_x *= 48;
