I2C on 5282

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

I2C on 5282

1,456 次查看
SVC2
Contributor II

Hi,

 

I am using the I2C on 5282. The manual states that the ICF bit in the Status register indicates if transfer is in progress or completed.

 

Checking the ICF bit does not work. Instead, checking the IIF bit works fine.

 

Is it a mistake in the manual or I am missing something (I am not using any interrupts)?

 

Thanks,

Simon

标签 (1)
0 项奖励
回复
1 回复

827 次查看
cutworth
NXP Employee
NXP Employee

Hi,

 

Here is the explaination. When you are using I2C module, you might have multiple devices connected to the bus and there might be arbitration involved and you might have arbitration lost, also you might be receiving a calling address when in slave receive mode. ICF bit just reflects data transfer complete, but IIF reflects three cases:

 

  • Complete one byte transfer (set at the falling edge of the ninth clock)
  • Reception of a calling address that matches its own specific address in slave-receive mode
  • Arbitration lost

 

So you better read IIF.

 

OK, I know that you are not using interrupt, you are just try to poll the IIC interrupt status, IIF is just a flag, if you are not enabling IIEN, no I2C interrupt will be fired.

 

 

0 项奖励
回复