Skip to main content
Visitor II
May 20, 2024
Solved

Issue while configuring the example of lis2dw12 sensor

  • May 20, 2024
  • 1 reply
  • 1237 views

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,


    This topic has been closed for replies.
    Best answer by Federica Bossi

    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.

    1 reply

    Technical Moderator
    May 23, 2024

    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.

    M4n0jAuthor
    Visitor II
    May 24, 2024

    Ok let me check Thanks @Federica Bossi