FXAS21002 gives WHO_AM_I as 0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FXAS21002 gives WHO_AM_I as 0

1,065 Views
ekalyvio
Contributor II

Hello.

I am querying the FXAS21002 gyro via I2C interface for the WHO_AM_I register. I don't seem to get any result other than 0. Following is a screen shot from the logic analyzer.

FULL.png

What seems to me slightly strange is that after the 9th bit (the ACK) get transmitted, the SDA doesn't go high for some period of time before the address of the register gets transmitted. Is it possible that this is the problem I am facing?

If not, what might be the problem?

Thank you very much in advance.

Labels (1)
0 Kudos
Reply
2 Replies

832 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Efthymios,

I guess the problem is that you are sending the stop condition (a LOW to HIGH transition of SDA while SCL is HIGH) after the second byte (0x0C) instead of sending the repeated start condition. So try to modify your source code so that SDA transitiones to HIGH before the SCL goes HIGH in order to eliminate the stop condition.

FXAS21002 WHO_AM_I Read.JPG

Hope it helps.

Best regards,

Tomas

832 Views
ekalyvio
Contributor II

Hi Tomas.

Thanks. You are right. The repeated start is actually the issue. It seems that Raspberry Pi3 can not handle it correctly.

Kind regards,

Efthymios

0 Kudos
Reply