MMA8652FCR1 Problems with WHO AM I

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

MMA8652FCR1 Problems with WHO AM I

1,152 Views
kevinmc
Contributor II

Hi,

Currently running a MMA8652FCR1 in a prototype system. We are basically looking to validate comms and then configure the device.

We are not getting the expected response from the WHO AM I register reading. I have attached a plot of the comms link. I2C is in normal mode and is operating at 98kHz based on the attached.

We have seen a similar, but incorrect, response from a few devices. Has anyone any experience of this?

Thanks in advance,

KMC

Labels (2)
Tags (1)
3 Replies

937 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Kevin,

Looking at your screenshot, there is the stop condition between the second (0x0D) and third byte (0x3B). This is incorrect.

 

You need to change your source code so that SDA transitiones to high before the SCL goes high in order to eliminate this stop condition.

 

The transaction should look as follows:

1. Send a start sequence

2. Send 0x3A // MMA8652FC slave address with the R/W bit low or 0x1D << 1

3. Send 0x0D

4. Send a start sequence again (repeated start)

5. Send 0x3B // MMA8652FC slave address with the R/W bit high or (0x1D << 1) | 0x01

6. Read the data byte from WHO_AM_I register

7. Send NAK and the stop sequence

Who_Am_I register read.JPG

Hope it helps.

Best regards,

Tomas

937 Views
kevinmc
Contributor II

Thanks Tomas.

I do use other I2C devices with this method an I don;t have issues.... 

I will impliment directly .

Many thanks,

Kevin

0 Kudos
Reply

937 Views
kevinmc
Contributor II

Sorry, I forgot to mention that we started to look at a series of bytes as the first byte we see as a response was always 0x00. The plot shows 4 byte response of 0x00 / 0x9D / 0xFC / 0x89 - We expect to see 0x4A 

Thanks again

0 Kudos
Reply