arch/arm64/src/imx9/imx9_lpi2c.c: Ignore spurious RX interrupts
Check remaining data count, just in case an extra RX interrupt occurs after receiving a message Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
parent
dd88c7fcfa
commit
78d2d884d3
@ -1576,7 +1576,7 @@ static int imx9_lpi2c_isr_process(struct imx9_lpi2c_priv_s *priv)
|
||||
|
||||
/* Check if there are received bytes */
|
||||
|
||||
else if ((status & LPI2C_MSR_RDF) != 0)
|
||||
else if ((status & LPI2C_MSR_RDF) != 0 && priv->dcnt > 0)
|
||||
{
|
||||
imx9_lpi2c_traceevent(priv, I2CEVENT_RCVBYTE, priv->dcnt);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user