AnsweredAssumed Answered

LIS3DSH State Machine ?

Question asked by jianli.cai on Mar 8, 2016
Latest reply on Mar 8, 2016 by jianli.cai
Hello ,everyone.
  Now, I have some prolem about LIS3DSH . I tried run "state machine" LIS3DSH presets WakeUp from AN3393 page 78, but anything I do, the  interrupt  occur on INT1 all the time. What is the Problem ?

These codes debug on my device:

LIS3DSH_GetWHO_AM_I(&tmp);
printf("who am I ?.........    \r\n");
if(vtmp==0x3F)
printf("I am LIS3DSH (0x%d )  \r\n",tmp);     
else
printf("I am ??? ~   \r\n");     

LIS3DSH_WriteReg(0x21, 0x01);
LIS3DSH_WriteReg(0x23, 0x48);
LIS3DSH_WriteReg(0x20, 0x67);
LIS3DSH_WriteReg(0x57, 0x55);
LIS3DSH_WriteReg(0x59, 0xFC);
LIS3DSH_WriteReg(0x5A, 0xFC);

LIS3DSH_WriteReg(0x40, 0x05);
LIS3DSH_WriteReg(0x41, 0x11);
LIS3DSH_WriteReg(0x42, 0x00);
LIS3DSH_WriteReg(0x43, 0x00);
LIS3DSH_WriteReg(0x44, 0x00);
LIS3DSH_WriteReg(0x45, 0x00);
LIS3DSH_WriteReg(0x46, 0x00);
LIS3DSH_WriteReg(0x47, 0x00);
LIS3DSH_WriteReg(0x48, 0x00);
LIS3DSH_WriteReg(0x49, 0x00);
LIS3DSH_WriteReg(0x4a, 0x00);
LIS3DSH_WriteReg(0x4b, 0x00);
LIS3DSH_WriteReg(0x4c, 0x00);
LIS3DSH_WriteReg(0x4d, 0x00);
LIS3DSH_WriteReg(0x4e, 0x00);
LIS3DSH_WriteReg(0x4f, 0x00);
LIS3DSH_WriteReg(0x5B, 0x01);

Outcomes