LPCOpen bug : Chip_I2CM_XferHandler()

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

LPCOpen bug : Chip_I2CM_XferHandler()

342 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pierre on Tue Oct 14 00:49:45 MST 2014
This is for LPC4330 and related.

Chip_I2CM_XferHandler() contains a switch/case reacting to the I2C hardware state.

Sometimes it reports an "error" and aborts mid-transaction, but does not reset the hardware, so the next I2C transaction gets stuck.

In fact there is no error. The hardware sometimes sends status code 0xF8 to the IRQ and the manual specifically states that it should be ignored, while LPCOpen treats it as an error.

To fix it, please add this case in the switch :

    /* FIX : STAT = 0xF8
        This status code indicates that no relevant information is available because the serial
        interrupt flag, SI, is not yet set. This occurs between other states and when the I2C block
        is not involved in a serial transfer.

        This function should do nothing at all, modify no registers, and simply return.
*/
case 0xF8:
return 0;


Have a nice day !
Labels (1)
0 Kudos
0 Replies