cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to read anything at I2C LSM303AGR

MRobr
Associate III

Hi,

I have a test program that works for our old board that uses I2C LSM303AGR. Now we have a new board with LSM303AGR and the test program does not work. I would like to know if there is any change in I2C Slave Address for LSM303AGR. Our LMS03AGR circuitry is according to datasheet.

Best Regards,

Markel Robregado

1 ACCEPTED SOLUTION

Accepted Solutions
MRobr
Associate III

Hi Eleon,

I have troubleshooted this extensively. There is no problem with the I2C lines since I have used it to communicate at another I2C sensor at another board.

This new board has LSM303AGR with date code 636 meaning it was made 2016 WW 36. Our old board that works has LSM303AGR with date code 802 meaning it was made 2018 WW 02.

I managed to replace the LSM303AGR with date code 636 with LSM303AGR with date code 802. After replacing I was able to read the WHO AM I register with correct value 0x33. Meaning the LSM303AGR with date code 636 is faulty.

Regards,

Markel

View solution in original post

9 REPLIES 9
Eleon BORLINI
ST Employee

Hi @MRobr​ , quite strange... are you sure the only difference between the old an d the new board is the LSM303AGR? There have been no change in the I2C slave address of LSM303AGR:

  /** I2C Device Address 8 bit format**/
#define LSM303AGR_I2C_ADD_XL       0x33U
#define LSM303AGR_I2C_ADD_MG       0x3DU
 
/** Device Identification (Who am I) **/
#define LSM303AGR_ID_XL            0x33U
#define LSM303AGR_ID_MG            0x40U

Did you check the digital pattern with an oscilloscope? It may be however another kind of issue: are you receiving an acknowledge on the SDA line? Which pull-up resistors are you using? The Vdd / VddIO is always the same? The application processor is the same?

Regards

MRobr
Associate III

Hi Eleon,

Here is the I2C Logic Analyzer to read the Device ID, From this we just write but no reply from the LSM303AGR. I am using TI CC2640R2F to communicate with LSM303AGR.

0693W000003Bj7aQAC.jpg

Here is the USB Microscope picture of the LSM303AGR. From the marking I am not entirely sure if it is LSM303AGR.

0693W000003Bj8YQAS.jpg

Here is the LSM303AGR circuitry which is according to the datasheet. The pull up resistors value is 5.1 KOhm

0693W000003Bj9lQAC.jpg

Using the I2C lines of this board, I communicated with I2C TMP007 of another board without problems, meaning there is no problem with the I2C lines. My troubleshooting investigation is pointing to that there is really a problem with the LSM303AGR or the I2C Slave Address is different.

Best Regards,

Markel Robregado

With I2C you should be able to probe the slave address space to find any responding devices.

You could also try bit-banging the I2C to see if that works.

Check part orientation, soldering, solder mask, cleaning.

If you have X-RAY equipment you could use that.

Check continuities on an unpopulated PCB, double check design expectations, and nets

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

There is only I2C device connected to the MCU, which is the I2C LSM303AGR. I already did most of your suggestions before except the xray, which we do not have access.

Hi Eleon,

Would there be a problem if we use 0201 SMD package for 0.1uF C15 and C16?

Regards,

Markel

Hi Markel, sorry for the late answer to your question... No, it is ok to use that kind of package for the capacitors. Are you still having issues with the I2C communication?

Regards

MRobr
Associate III

Hi Eleon,

I have troubleshooted this extensively. There is no problem with the I2C lines since I have used it to communicate at another I2C sensor at another board.

This new board has LSM303AGR with date code 636 meaning it was made 2016 WW 36. Our old board that works has LSM303AGR with date code 802 meaning it was made 2018 WW 02.

I managed to replace the LSM303AGR with date code 636 with LSM303AGR with date code 802. After replacing I was able to read the WHO AM I register with correct value 0x33. Meaning the LSM303AGR with date code 636 is faulty.

Regards,

Markel

This should be the case... thanks for your very fast update. Did you faced the issue on that single device or also on other 636-marked LSM303AGRs? Regards

MRobr
Associate III

Hi Eleon,

I have 4 boards with LSM303AGR date code 636, all can not be read.

I am suspecting the PCB Manufacturer source this part not from official ST Microelectronics distributor.

Regards,

Markel Robregado