Skip to content

Commit

Permalink
arch/arm64/src/imx9/imx9_lpi2c.c: Ignore spurious RX interrupts
Browse files Browse the repository at this point in the history
Check remaining data count, just in case an extra RX interrupt occurs
after receiving a message

Signed-off-by: Jukka Laitinen <[email protected]>
  • Loading branch information
jlaitine committed Sep 13, 2024
1 parent 07eb70f commit 1826648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/src/imx9/imx9_lpi2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1826648

Please sign in to comment.