MC33PF8200, PFS8613 has registers read problem

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

MC33PF8200, PFS8613 has registers read problem

1,945 次查看
黄俊增
Contributor I

hi,

I have a problem of reading MC33PF8200/PFS8613 registers, here is the problem:

when I try to read registers of MC33PF8200/PFS8613, the first time the result is OK, but the second time the result is wrong, the third time the result is OK, the fourth time the result is wrong...

I read the registers through I2C interface, and I'm using GPIO to simulate I2C bus, the I2C software driver has been tested with other ICs, and it's OK with others ICs like MAX20087, MPQ4230...

The test codes is here(the parameter 0x00 meas DEVICE ID register address):

uint8 testValue;
testValue = PF8200TestFuncReadReg(0x00);    // the result is 0x48, it's right
testValue = PF8200TestFuncReadReg(0x00);    // the result is a wrong number
testValue = PF8200TestFuncReadReg(0x00);    // the result is 0x48, it's right
testValue = PF8200TestFuncReadReg(0x00);    // the result is a wrong number
testValue = PF8200TestFuncReadReg(0x00);    // the result is 0x48, it's right

I have no idea why it acting like this, dose anyone knows the reason?

标记 (3)
0 项奖励
回复
2 回复数

1,931 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

I hope all is great with you.

Are you using an evaluation board such as PF8100-PF8200-EVAL-KITS?

Could you please share some timing specs? I mean, how long it takes between one read and another?

Is your device behaving as expected?

Regards,

David

0 项奖励
回复

1,927 次查看
黄俊增
Contributor I

hi,

Thanks for reply.

I have solve this problem, and here is the reason:

When MCU has received data from slave device, it should send "P" on I2C bus. In my software, I send a "ACK" to slave device before send "P" on I2C bus. This is described in the AN13107 document.

When I correct this mistake, the reading problem is fixed either.

Thanks anyway!

 

0 项奖励
回复