AnsweredAssumed Answered

LIS3DSH I2C Communication Issue

Question asked by Terence D on May 24, 2018
Latest reply on May 28, 2018 by Winfred Lu

I'm trying to use the LIS3DSH accelerometer with a TI TM4C1294 development board and running into some issues.  I'm using I2C communication between the accelrometer and TM4C.  I have a fairly simple code example attached, which queries multiple registers and reports them to a terminal using UART program (screenshot below).

 

As can be seen in the terminal program, the values read by the software frequently differ from iteration to iteration.  I expect to be getting 0x3F for "who am I", 0x21 for "info1" and probably 0x0F for "status".  Based on what's displayed (in the Putty terminal screenshot), it looks like I'm reading the data register at improper times???...

 

However, comparing my logic analyzer info with the timing diagram on page 15 of the LIS3DSH datasheet, I don't see any issues.  A screenshot of the logic analyzer results are shown below.

 

I've captured many instances of the I2C communication for this example and it always is exactly as shown in the screenshot below.  I always see the expected 0x3F and 0x21 values for "who am I" and "info1", and always see 0x00 for "status".  Though I would expect to see 0x0F for status, it is possible 0x00 is a valid value.

If anyone has any ideas what might be happening, I'd very much appreciate your feedback.  Thank you.

Attachments

Outcomes