MMA8653FC - intermittent axis register I2C read problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MMA8653FC - intermittent axis register I2C read problem

1,068件の閲覧回数
patrick_conway
Contributor I

Hello,

I have observed an intermittent issue when reading axis registers 0x00-0x06 from MMA8653FC via I2C. The issue is somewhat difficult to reproduce reliably, so I'd like to check if a similar problem has been observed by others (it might be a known issue).

Within the system, a Kinetis K02 MCU reads the accelerometer registers 0x00-0x06 at 4 second intervals. The I2C bus is set up at 100kHz. On the same bus, reads and writes are also issued
to an FRAM memory device at non-regular intervals.

The I2C read/write transactions issued to the accelerometer are as follows:

Initialisation only:
I2C Write: Register address 0x2A (CTRL_REG1)
I2C Write: Data 0xA1 (ACC_CONTROL_REGISTER_ACTIVE | ACC_CONTROL_REGISTER_DATA_RATE_50Hz | ACC_CONTROL_REGISTER_SLEEP_RATE_6_25Hz)]
[Note: F_READ == 0)

Every 4 seconds:
I2C Write: Register address 0x00 (STATUS)
I2C Read: 7 bytes (registers 0x00 - 0x06)

A logic trace for a "good" regular read transaction is attached.

The 7 bytes read back to software buffer for a "good" read would be:

A B C D E F G

However, intermittently it is observed that data read back is of the form:

D E F G A B C

This is consistent with 7 bytes requested from starting address 0x03 (allowing for the auto-increment wraparound behaviour when F_READ == 0). Once this state is entered, it remains so until a system power cycle.

Has similar behaviour been observed by others? Could it arise from any known issues/features with the accelerometer's auto-increment behaviour or internal address pointer?

ラベル(1)
タグ(2)
0 件の賞賛
1 返信

953件の閲覧回数
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Patrick,

I have not heard of such behavior so far.

 

Are you able to capture it using a logic analyzer and post it here?

Does it happen if you read data registers 0x01 – 0x06 only?

 

I do not see any reason to read the STATUS register if you read the data every 4 seconds – its content will always be 0xFF.

Best regards,

Tomas

0 件の賞賛