AnsweredAssumed Answered

How to configure state machine of LIS3DSH

Question asked by xia.gaoyang on Apr 15, 2014
Latest reply on Apr 25, 2014 by Wapers
hi,
   I can't get the interrupt after configuring the state machine of LIS3DSH. Could you give me some examples. My code as following:
LIS3DSH_Write_Byte(CTRL_REG1, (u8)0x01);//enable SM1, SM1 interrupt routed to INT1
LIS3DSH_Write_Byte(CTRL_REG3, (u8)0x48);//Interrupt signal active HIGH, Interrupt locked, INT1 signal enabled
LIS3DSH_Write_Byte(CTRL_REG4, (u8)0x57);//X, Y, Z enabled, ODR = 50 Hz.
LIS3DSH_Write_Byte(CTRL_REG5, (u8)0x00);//filter bandwidth 800 Hz, +/-2g, Self-test Disabled
LIS3DSH_Write_Byte(TIM3_1, (u8)20);//Timer3 1000ms
LIS3DSH_Write_Byte(ST1_0, TI3);//SM1 state 1
LIS3DSH_Write_Byte(ST1_1, CONT);//SM1 state 2

Outcomes