Skip to main content
Explorer
November 19, 2024
Solved

LSM6DSV gyroscope result issue

  • November 19, 2024
  • 1 reply
  • 1109 views

Hi all

I am trying to debug an issue at work where we use the LSM6DSV accel/gyro IMU chip and I am running into a little problem

The result registers for the accelerometer and gyroscope both say that they return a 16-bit two's complement result, and I get the following

Gyro / Accel

Raw unsigned value

(LOW | (HIGH << 8))

Two's complement value (Signed)Result (mG or mDPS)
Accelerometer X65524-12-0.732
Accelerometer Y1334713347814.167
Accelerometer Z1111116.771
Gyroscope X32772-32764-143342.5
Gyroscope Y3276432764143342.5
Gyroscope Z37149-28387-124193.125

My system is sitting very still and on a somewhat level surface. The accelerometer seems correct. For a value close to 0, we see the unsigned value close to 0 or very high around 65535 which is what I would expect.

The gyroscope values for a zero rate I would expect to also be similar given the datasheet says this "The value is expressed as a 16-bit word in two’s complement"

My basic thinking is that these are expressed as a 15-bit word in two's complement.

I have double checked that the device is indeed an LSM6DSV chip as the WHOAMI register returned a value of 0x70

Just for additional reference, the gyro is configured in

high performance, 120Hz ODR and the sensitivity is set to 125 DPS

 

Any help would be much appreciated

    This topic has been closed for replies.
    Best answer by Adam Hamilton

    I found the issue for this. It seems that the first reading from the gyro is junk. This wasn't the case for the accelerometer however.

    1 reply

    Adam HamiltonAuthorAnswer
    Explorer
    November 20, 2024

    I found the issue for this. It seems that the first reading from the gyro is junk. This wasn't the case for the accelerometer however.