W5500 undefined behavior

Hi Guys,

I’m trying to implement a send socket and a receive socket on with one W5500 and an STM32F407.

Basically the Receive socket accept connection from remote client 1, the Send socket then connects to remote client 2, then afterward i would just forward data chunks received from remote client 1 to client 2.

Here’s the problem, during transfer, sometimes W5500 would RANDOMLY terminate connections (sending TCP RST packets to the 2 remote clients ), then be stuck in a reset loop ( all registers values are 0).

I’m using 8 sockets mode, each data chunks at 1k bytes and my host is an STM32F407VG discovery kit, the RST pin is always HIGH.

Please let me know what could be causing this problem and/or if i’m doing anything wrong.
Any help is greatly appreciated, thank you in advance.