AnsweredAssumed Answered

LIS2DE12 no interrupt and constant acceleration values

Question asked by Denis Thomas on Oct 9, 2017
Latest reply on Oct 13, 2017 by Miroslav B

Hello,
Firs of all thank you for your time.
I'm currently working with a LIS2DE12 for its great low power current but unfortunately I'm not able to get any useful information from the device. I tried to active an interrupt in the idea to check movement in any direction (i just want an interrupt if the device is moving). It doesn't work but worst when I read the register of the acceleration i have always the same values (exactly the same even when moving, reversed, ...). I guess I have made some mistakes in my configuration but I was not able to find where is the problem. 

Just below my pseudo-code. The I2C function are working correctly (I'm able to communcate with the LIS2DE12 )
init:

 

Check  ACCEL_WHO_AM_I
write 0xC0 ACCEL_TEMP_CFG_REG // enable the measure of the temperature
write  0x57 CTRL_REG1 //  100Hz & activate all the axes
write 0x00 CTRL_REG2 // No filter
write 0x00 CTRL_REG3 // No specific interrupt
write 0x80  CTRL_REG4 // BDU activated for the temperature
write 0x08 CTRL_REG5 //  Latch interrupt
write 0x00 CTRL_REG6 // no INTERRUPT on int2
write 0b00101010 INT1_CFG // Interrupt OR when over threshold
write 0x16 INT1_THS  // Set the threshold
write 0x03 INT1_DURATION // Set the duration (small one)
write 0x00 FIFO_CTRL_REG  // bypass mode

 

 

loop:
check if data available ( read STATUS_REG_AUX) then

   read ACCEL_OUT_X_H,ACCEL_OUT_Y_H,ACCEL_OUT_Z_H

check if INT1 == 1 then
      LED = 1 // to be able to see the interruption

 


I hope that I respected the rules of this forum.
kind regards,
Denis

Outcomes