Is W5100 Listen Mode Persist?

Hi
when i set the W5100 on Listen Mode(Sn_SR = SOCK_LISTEN), is it persistence or have time out? if no connection-disconnection from Client not occur (and also no internal close from w5100), is the listen mode persist?

I did not see anything about this state timing out in the datasheet, thus it must be persistent. And it is generally logical - no one knows when request to connect arrives, thus if socket is in LISTEN state it must be there until socket is reconfigured, or connection using this socket is requested.

I set the socket 0 OPEN and the set it to LISTEN mode. Then in an infinite test loop i read the S0_SR(0x0403). In Most times, it is SOCK_LISTEN. But some time it becomes 0x08 or 0x02(temporary) and these are out of Sn_SR table!!

I have problem with data received length(Sn_RX_RSR ). Some times it becomes false.(0xFF64 instead of 0x0064)

May be these problems connected to each other? what can i do with them?

Parallel or SPI mode? I suspect you use parallel mode. What is timing? Please draw the timing diagram.

SPI using Spartan-3
I am using 500 Khz SCK. Timing diagram is hard to discover! I done it according to P.67 of w5100 datasheet.
Is there any other feedback from W5100 to check my code?

  • I thought (according to your guide in my another topic) that if i don’t read data the Socket 0 RX Received Size(0x0426-7) should increase. But I tested it and that’s not so.I read just the data size in each RECV int and for each 100 byte data PKT, Size Register is 0x0064. what about this? Does w5100 read only one packet in each time?

Sure. 6.3.3 shows that W5100 will respond with 0, 1 and 2 during read cycle.

Decimal 100 in hexadecimal ix 0x64.

No, it gives you amount of data arrived. If two packets will arrive between updating pointers, it will show data length for two packets.