Content originally posted in LPCWare by atomicdog on Wed Feb 01 00:48:00 MST 2012
Quote: dragilla
Ok. So clearing the interrupt flag. How else would I check the interrupt flag if it's not cleared first?
Or maybe you mean, that I clear it after setting STA, so the interrupt flag actually may be set first, then I clear it? Hm...
But it works now, another night of flawless operation... Only I added those checks, which actually don't do anything since it just works now. I don't get it.
Clear it before you set STA. Before you try to start a new transaction you should have the I2C peripheral in a know good state.