WIZnet Developer Forum

Socket Timeout Not Working - W5100S

Hello,

Working on the interrupt-driven interface of W5100S [TCP Server]. But I’m facing a problem with socket TIMEOUT interrupt. The Sn_IR[TIMEOUT] bit doesn’t set even after TIMEOUT occurs.

The problem started by initiate the DISCONNECT process. It is stuck at 0x18 status (wait for FIN). But my client tool doesn’t send FIN back so it stuck in while loop in disconnect function. In that while loop, it checks for Sn_IR[TIMEOUT] that never set and stuck in that loop. Also tried tested with set and reset IMR[TIMEOUT].

From the datasheet, irrespective of the Interrupt mask register TIMEOUT bit of Sn_IR must be set after TIMEOUT occurs.

Value of RTR = 2000 and RCR = 0x07 so approx TIMEOUT arround 30 seonds.
Value of Sn_RTR[0] = 0 and Sn_RTR[0] = 0 so it will take the value from RTR and RCR.
Also tried set value of Sn_RTR[0] and Sn_RCR[0] but these value always read zero.

Can anyone have faced this problem before?
Please share your opinion about this problem.

Thanks in advance

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.