MMA8652FCR1 Problems with WHO AM I

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MMA8652FCR1 Problems with WHO AM I

2,359 次查看
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

标签 (2)
标记 (1)
3 回复数

2,144 次查看
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

2,144 次查看
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 项奖励
回复

2,144 次查看
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 项奖励
回复