6 arbitration lost, 7 flow control, Arbitration lost -18 – Freescale Semiconductor MCF5480 User Manual
Page 872: Flow control -18

MCF548x Reference Manual, Rev. 3
28-18
Freescale Semiconductor
/* Receive data from master device and store in rx-buffer */
for(i=0; i { /* Wait for transfer to complete */ while (!(MCF_I2C_I2SR & MCF_I2C_I2SR_IIF) ); /* Clear IIF bit */ MCF_I2C_I2SR &= 0xFD; /* Store received data and release SDA */ rx_buffer[i] = MCF_I2C_I2DR; } 28.5.6 Arbitration Lost If several masters try to engage the bus simultaneously, only one master wins and the others lose arbitration. The devices which lost arbitration are immediately switched to slave receive mode by the hardware. Their master that has lost arbitration immediately releases the bus, but SCL is still generated until the end of the byte during which arbitration was lost. An interrupt occurs at the falling edge of the ninth clock of this transfer with IAL = 1 and MSTA = 0. hardware will inhibit the transmission, switch the MSTA bit from 1 to 0 without generating a STOP condition, generate an interrupt to the CPU, and set the IAL bit to indicate that the attempt to engage the bus has failed. When considering these cases, the slave service routine should test the IAL bit first, and the software should clear the IAL bit if it is set. 28.5.7 Flow Control displays the flow of a typical I 2 C interrupt process.
If the MCF548x attempts to start transmission while the bus is being engaged by another master, the