W5500 CLOSE releases the local socket without performing the TCP disconnect handshake. WIZnet distinguishes that command from DISCON, which performs the applicable closing exchange and can eventually time out. A working 25 MHz KDS crystal and reliable data transfer do not make the two commands equivalent. If the remote server needs a normal TCP close notification, a local SOCK_CLOSED status alone is not the acceptance criterion.
Decide whether to reclaim resources or signal a normal close
An uploader that expects the server to observe connection termination should use the documented disconnect procedure and allocate a wait for its result. A fault recovery policy may close the local socket immediately, but that action does not promise a FIN at the peer. A broken link or an unresponsive peer can also prevent a normal handshake. The same local closed state may follow completion, timeout or forced cleanup. Separately verify that the receiving application processed the final upload; a FIN does not confirm business-level acceptance.
Compare traces with only the closing command changed
On an approved bench, open two equivalent TCP connections and finish one with DISCON and one with CLOSE. Save the command, socket state, any timeout and the peer capture. Test the timeout path separately so the driver has a defined point for reporting failure and allowing local cleanup. If no FIN appears only with CLOSE, fix the shutdown sequence rather than changing the crystal. If establishment and transfer are unreliable in both groups, diagnose the physical link, power and reference independently. Put handshake, local release and application confirmation in separate acceptance fields.
Related selection guide: MERLIN Crystal Timing: Can a 12 pF crystal replace the 18 pF crystal on a 25 MHz W5500 board?
Resource link: https://www.mecxtal.com.cn/en/handbook/new-0785.html
