W5500 read interrupt re-triggering

I am not sure what I am doing wrong here, but my socket rcv interrupt is re-triggering after clearing socket interrupt and common reg socket interrupt.

Sequence is:
Poll for SIR status
Check Sn_IR status
clear Sn_IR interrupt (tried writing 0xff)
clear SIR interrupt.
read both IR gives 0 res

After that I read the rx buffer and send sock_RECV.

Is that correct sequence ? or should I first read and send RECV and then clear the interrupts ?

1 Like

Hi, gossamer.

If RX data is remained in RX memory, recv interrupt is not cleared.
So, Clear IR after sock_RECV command.