AnsweredAssumed Answered

LIS3DH Click Interrupt

Question asked by Donald Chen on May 15, 2017

Hey guys, I dunno what I add but seems I can't generate interrupt after I click on LIS3DH, here what I do.

void Acc__EnableClickDetect(void)
{
  LIS3DH_SetAxis(LIS3DH_X_ENABLE  |LIS3DH_Y_ENABLE | LIS3DH_Z_ENABLE );
  LIS3DH_SetODR(LIS3DH_ODR_400Hz);
 
   
 
  LIS3DH_WriteReg(LIS3DH_CTRL_REG3, 0x80);
  LIS3DH_WriteReg(LIS3DH_INT1_CFG, 0x2A);


  LIS3DH_SetIntConfiguration(0x2A);
  LIS3DH_SetInt1Pin(0x80);


  LIS3DH_SetClickCFG(LIS3DH_ZD_ENABLE | LIS3DH_ZS_ENABLE | LIS3DH_YD_ENABLE | LIS3DH_YS_ENABLE| LIS3DH_XD_ENABLE |LIS3DH_XS_ENABLE);
  LIS3DH_SetClickTHS(50);
  LIS3DH_SetClickLIMIT(50);
  LIS3DH_SetClickLATENCY(100);
 

  LIS3DH_Int1LatchEnable(MEMS_ENABLE);
    
  LIS3DH_ResetInt1Latch();
 
  return;
}

 

I dunno what I left or what function I added wrongly, could you guys please help through me? Thanks.

Outcomes