cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DE12 Accelerometer I2C data Reading Problem

udhakumar udhayakumar
Associate II
Posted on November 12, 2017 at 08:35

Hi, I'm working with LIS2DE12 for motion detection. I have configured INT1. Whenever motion is detected I'm reading  INT1_SRC but its value is not changing. It is always same 01101000. Here's the configurations I have set.

CNTRL_REG0 = 10h    //SDO pull_up connected

CNTRL_REG1 = 3Fh   //25Hz, Enable XYZ axes

CNTRL_REG2= 03h    //HPF enabled for Interrupt

CNTRL_REG3= 40h    //INT1 on INT1 pin

CNTRL_REG4 =00h    //Default BDU disabled

CNTRL_REG5= 04h     //4D enabled

CNTRL_REG6= 20h    // INT2 Interrupt on INT2 pin /clk INT2 & activity INT DISABLED..

INT1_CFG       = 7Fh    //X,Y,Z interrupts , 6-D enabled

INT1_THS       = 05h 

INT1_DUR      = 03h      //  (03/25) seconds.

Also OUT_X_H, OUT_Y_H, and OUT_Z_H gives always same values. Anything I'm missing in the configuration? help me out of this.

#accelerometer
1 ACCEPTED SOLUTION

Accepted Solutions
udhakumar udhayakumar
Associate II
Posted on November 14, 2017 at 18:18

I got it working by setting FIFO register settings correctly. But in datasheet it is told to read acceleration data with starting address 28h.. But with that address if read 6-bytes upto 2Dh it is giving always zeros.. If the starting address for acc_data reading is given as (08h | 28h) instead of 28h acc_data values are reading correctly. Then I'm able to read x,y,z acc_data ..Why it is like that.?

View solution in original post

1 REPLY 1
udhakumar udhayakumar
Associate II
Posted on November 14, 2017 at 18:18

I got it working by setting FIFO register settings correctly. But in datasheet it is told to read acceleration data with starting address 28h.. But with that address if read 6-bytes upto 2Dh it is giving always zeros.. If the starting address for acc_data reading is given as (08h | 28h) instead of 28h acc_data values are reading correctly. Then I'm able to read x,y,z acc_data ..Why it is like that.?