I2C on 5282

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

I2C on 5282

1,442件の閲覧回数
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 返信

813件の閲覧回数
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 件の賞賛
返信