AnsweredAssumed Answered

ADXL345 DATA READY interrupt and Signle&Double tap not working

Question asked by pentelone on Apr 25, 2014
Latest reply on May 19, 2015 by Orks

Hello,

 

I'm trying to read data form ADXL345 when it triggers data interrupt on int pin. During debbug sesion i see that ADXL345 do not let uC know that there is new data to read. It only let it know about free fall activity and inactivity. DATA Ready Single & Double tap interrupts are not working. Did i forget to setup something more in registers?

Heres what i send to ADXL345. I will add that every data which have been send to ADXL345 are then verify and uC let me know if sth is wrong, so i'm 100% sure that communication is working fine

 

ADXL345_WRITE_AND_VERIFY(POWER_CTL,0x00);

          ADXL345_WRITE_AND_VERIFY(FIFO_CTL,0x00);

          ADXL345_WRITE_AND_VERIFY(BW_RATE, 0x0A); //0x0e

          ADXL345_WRITE_AND_VERIFY(DATA_FORMAT, 0x0A);//0x08

            //////////////////// config of tap detection ////

  ADXL345_WRITE_AND_VERIFY(0x1D,0x20);

          ADXL345_WRITE_AND_VERIFY(0x21,0x60);*/

          //ADXL345_WRITE_AND_VERIFY(ADXL345_LATENT_REG,0x30);

          //ADXL345_WRITE_AND_VERIFY(ADXL345_WINDOW_REG,0x60);

          /ADXL345_WRITE_AND_VERIFY(ADXL345_TAP_AXES_REG ,0x09);

          ADXL345_READ(ADXL345_TAP_AXES_REG,&flush);

          ///////////////////free fall/////////////////

          ADXL345_WRITE_AND_VERIFY( ADXL345_THRESH_FF_REG ,0x0E);

          ADXL345_WRITE_AND_VERIFY(ADXL345_TIME_FF_REG ,0x2E);

          ADXL345_READ(ADXL345_THRESH_FF_REG,&flush);

          ADXL345_READ(ADXL345_TIME_FF_REG,&flush);

 

          ////////////////// inactivity & activity //////

          ADXL345_WRITE_AND_VERIFY(ADXL345_THRESH_ACT_REG,0x03);

          ADXL345_WRITE_AND_VERIFY(ADXL345_THRESH_INACT_REG,0x02);

          ADXL345_WRITE_AND_VERIFY(ADXL345_TIME_INACT_REG,0x04);

          ADXL345_WRITE_AND_VERIFY(ADXL345_ACT_INACT_CTL_REG,0xFF); //ff*/

          ////////////////// FIFO /////////////////////////

          //ADXL345_WRITE_AND_VERIFY(ADXL345_FIFO_CTL,0x90); //90 int1 // b0 int2 - stream mode 16 samples

 

          //////////////////////// adxl345 int enable /////////////

          ADXL345_WRITE_AND_VERIFY(ADXL345_INT_MAP_REG, 0x00);

          ADXL345_WRITE_AND_VERIFY(ADXL345_INT_ENABLE_REG  ,0x9C); //0x64 bez act&inact 7C = inac&act //5c all without double tap //1c free fall inact&act

 

 

Thank you for help

Outcomes