2018-03-07 04:10 AM
Hello People,
I am trying to get data over i2c from LIS2DE12 sensor. Here I am attaching a screenshot so you can see the way I am configuring its register to read data for x,y and z axis. I dont want to use any interrupt. Simply want to read data.
#lis2ds12 #lis2d #mems #mems-accelerometer #lis2de12 #lis2dw12
2018-03-07 05:45 AM
Can you please explain exactly what is the problem?
2018-03-07 09:09 PM
I want to get data from
LIS2DE12 sensor
continuously. I have made configuration to fetch data for x,y and z. But I am not sure wheather they are perfectly configured or not because I am getting same data every time I run the program even if I move the sensor the data remains same. Can you help me with this with proper step by step procedure.Thanks
2018-03-10 08:17 AM
Please share the sensor configuration in some easily readable format (register + value).
2018-03-11 10:26 PM
Hi Misroslav
Thanks for reply.
I want fetch data from LIS2DE12 sensor continuously over I2C. I have configured this sensor as given below.
CTRL_REG4 = 0x00 // Continuously data updation, 2g, Normal mode
CTRL_REG5 = 0x40 // Fifo enable
FIFO_CTRL_REG= 0x40 // Fifo mode selection
Below is how I am trying to fetch data from LIS2DE12 sensor. But getting same data again and again even if I move sensor, data dose not get changed.
while (1)
{HAL_I2C_Mem_Read(&hi2c3 ,ACC_ADDR | 1 , (0x80 | 0x28) , I2C_MEMADD_SIZE_8BIT , rx_buffer , 6 ,10 );}
I am continuously monitoring rx_buffer in watch window. This is what I get in rx_buffer every time I run the program and even I move sensor. No change.
This is how I have configured and trying get data from sensor but not able to fetch properly.
2018-03-12 02:57 AM
Hi Moroslav
Thanks for your suggestion. its work.
If i use data ready interrupt in INT1 pin. then which configuration i do?
Thanks
Nitin Kanani
2018-03-12 03:27 AM
You enable FIFO and used mode called 'FIFO mode'.
In FIFO mode, the buffer continues filling data from the X, Y and Z accelerometer channels until it is full (a set of 32 samples stored). When the FIFO is full, it stops collecting data from the input channels and the FIFO content remains unchanged.So I suppose the FIFO is full and stops collecting data.
Do you really need to use FIFO?
As first step I would propose do test it without FIFO CTRL_REG5 = 0x00,
FIFO_CTRL_REG = 0x00.
2018-03-12 08:14 AM
To enable DRDY interrupt on INT1 pin set the bit I1_ZYXDA in the CTRL_REG3.