Skip to main content
Visitor II
December 8, 2015
Question

Problems with LSM9DS0 I2C

  • December 8, 2015
  • 1 reply
  • 628 views
Posted on December 08, 2015 at 13:54

I'm using a LSM9DS0 wired to communicate with I2C. The chip seems to recognize when its being addressed, ACKs bytes, responds to reads, etc. but the problem is it always sends the same byte back. For example: I attempt to configure the device through the following sequence:

0xD4 0x20 0x7F 0x04 0x08 0x00 0x40

where D4 is the gyro address and 20 is the starting register. I then perform a read of 5 bytes to ensure that the device is configured as I want it to be but receive only five instances of 0x40. The pattern seems to be that the last byte written to a register is simply repeated over and over by the chip. The only exception is when reading the WHO_AM_I registers which respond as expected.

Has anyone else had this problem or have any ideas as to what might be going wrong?

#i2c-lsm9ds0
    This topic has been closed for replies.

    1 reply

    Visitor II
    December 10, 2015
    Posted on December 10, 2015 at 15:37

    Turns out that automatic register address increment is not enabled by default and I needed to bitwise OR my register address with 0x80 in order to get multi-byte transactions to work. This is why single byte transactions with the WHO_AM_I register worked fine while multi-byte transactions failed.