cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while configuring the example of lis2dw12 sensor

M4n0j
Associate

Hi

I am trying to configure the accelerometer sensor to read the data polling  as the example suggested in github
When I try to read
 /* Read output only if new value is available */
lis2dw12_flag_data_ready_get(&dev_ctx, &reg);


At initial the drdy will be high after that I am reading the lis2dw12_acceleration_raw_get(&dev_ctx, data_raw_acceleration);  once reading this register the drdy value must be 0 but it is high and its reading this continuously.
is there any register I have to check and we have placed this sensor with different MCU and I am new to STM community.


Thanks,


1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @M4n0j ,

Welcome to ST Community!

Read samples in polling mode means that you have no interrupt, the DRDY signal is latched and is not refreshed until you read all the output registers. Otherwise, set to '0' the LIR bit of register 22h to disable the latched interrupt.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Federica Bossi
ST Employee

Hi @M4n0j ,

Welcome to ST Community!

Read samples in polling mode means that you have no interrupt, the DRDY signal is latched and is not refreshed until you read all the output registers. Otherwise, set to '0' the LIR bit of register 22h to disable the latched interrupt.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Ok let me check Thanks @Federica Bossi