I2C on 5282

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C on 5282

1,440 Views
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

Labels (1)
0 Kudos
Reply
1 Reply

811 Views
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 Kudos
Reply