First check whether the connection has carried any data. WIZnet requires the TCP socket to reach SOCK_ESTABLISHED and transmit or receive data at least once before a keepalive packet is eligible. A completed handshake and a nonzero Sn_KPALVTR value are not sufficient by themselves. On a board using a 25 MHz KDS crystal, no keepalive after a bare handshake is not a reason to change the reference.
Test automatic and manual keepalive separately
Sn_KPALVTR uses five-second units. A decimal value of three sets a 15-second interval, not three seconds. The register applies to TCP, not other socket modes. A nonzero setting enables automatic keepalive and causes the manual SEND_KEEP command to be ignored. To verify manual operation, use a separate test with the register set to zero, then issue SEND_KEEP on an eligible connection. Do not use a manual command to judge whether automatic operation is functioning.
Compare two newly opened connections
On the same board and peer, open one connection without sending application data. On a second fresh connection, exchange a recognizable payload, then let it go idle. Retain the socket number, status, timer readback and a bidirectional trace. Distinguish the keepalive probe from handshake acknowledgments and application heartbeats. If the second setup produces probes but the first does not, change the software flow that prepares the connection. If neither does, check socket selection, retained configuration, actual traffic and capture coverage. If the product uses keepalive to trigger reconnection, separately measure the time until the application sees a broken link; the 15-second programmed interval alone is not a system detection deadline.
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
