LPC812 I2C MSTSTSTPERR Master Start/Stop Error flag being set improperly

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

LPC812 I2C MSTSTSTPERR Master Start/Stop Error flag being set improperly

749 Views
apines
Contributor II

Hi,

  I have an application which connects an LPC812M101JDH20FP to an Infineon TLV493D-A1B6 magnetic angle sensor via I2C.  No other devices are on the I2C bus and SCL and SDA are pulled up with 1.5k resistors.  The components are close together and noise is minimal.  The issue is that the LPC812 appears to get confused when the TLV493D asserts SDA when ACKing the slave address.  Of several hundred boards only a handful (maybe 20) exhibit the behavior.  When viewed on a scope it's clear that the TLV493D asserts SDA far more quickly than the LPC812 asserts SCL -- you can see SCL start to fall, then SDA falls very quickly, then eventually SCL is fully low some time later.  See the scope image below where the top trace is SDA and the bottom trace is SCL.  At this instance the MSTSTSTPERR status bit gets set which I think is indicating that the LPC812 is flagging that some external device tried to issue a start condition (SDA falling when SCL is high), though the LPC812 itself had already started driving SCL low before SDA fell.  This causes the transaction to abort, which causes the application to not work on these boards.  Adding a small amount of capacitance (47pF in our experiments) to either SCL or SDA slows the exchange enough to resolve the issue, but this shouldn't be necessary and we've already built several hundred boards.  We've resolved the problem by bit-banging the I2C interface instead of using the hardware I2C module but while this gets us out of our production jam it shouldn't have been necessary.  We'd like to be able to confidently use the I2C hardware module in the future and would appreciate some insight into what might be wrong here and how to properly work around it.  Thanks.

     -Andrew

IMG_2377.jpg

0 Kudos
Reply
0 Replies