Skip to main content
Visitor II
June 24, 2021
Question

In LSM6DSM, wrote a specific value to control registers. But gives different values from reading the same register.

  • June 24, 2021
  • 1 reply
  • 617 views

I'm using LSM6DSM sensor with the code from ST's github.I was able to read the whoamI register correctly. Then I wrote configuration(0x60) to the control registers(CTRL2_G) for gyro . When I read the same registers, it is always giving me a value of (0x02). These were all 0s at start. Also, the output registers like OUT_XL are giving 0 always.

    This topic has been closed for replies.

    1 reply

    ST Employee
    June 28, 2021

    Hi @SM.13​ ,

    that's strange... did you try to configure also the accelerometer (for example CTRL1_XL = 60h)?

    And at which Vdd/VddIO are you working?

    -Eleon