I sorry I don’t exactly understand your verbos question.
I understood that
[ul]
you use 2 UDP socket with 8K TX/RX buffer (==> Other sockets should have zero TX/RX buffer size)
PC doesn’t send any data to W5500. (==> Validate the existence of the ARP packet among wireshark captured packets)
No received data, but RECV flag of Sn_IR is set.
When you clear the Sn_IR(RECV) to zero, Socket closed.
[/ul]
Am I right?
I think that you have wrong interface(Read/Write) with W5500.
==> Without any writing to Sn_TOS and Sn_TTL, Their read values should be 0x00 and 0x80 respectly. But your read value is “TOS S0=100 S1=0” and “TTL S0=64 S1=64”.
Anyway, I recommend you try to ping-test using dos prompt and capture the ping-packet using wireshark.
==> If no response and ARP-packet captured, I will wonder that network registers as SIPR, SUBR and GWR maybe wrong write.
You use 2 UDP socket with 8K TX/RX buffer (==> Other sockets should have zero TX/RX buffer size)
Yes, that is true
PC doesn’t send any data to W5500. (==> Validate the existence of the ARP packet among wireshark captured packets)
PC sends UDP to W5500 and the first is OK, ARP is fine
No received data, but RECV flag of Sn_IR is set.
First message goes right from PC to RX buffer
When you clear the Sn_IR(RECV) to zero, Socket closed.
That is right
I think that you have wrong interface(Read/Write) with W5500.
Interface is working, tested with TX (from WIZ to PC, which is OK)
==> Without any writing to Sn_TOS and Sn_TTL, Their read values should be 0x00 and 0x80 respectly. But your read value is “TOS S0=100 S1=0” and “TTL S0=64 S1=64”.
I initialize all socket registers first by writing values there.
PING is tested and works fine, so does ARP
Anyway, I recommend you try to ping-test using dos prompt and capture the ping-packet using wireshark.
==> If no response and ARP-packet captured, I will wonder that network registers as SIPR, SUBR and GWR maybe wrong write.
I have downloaded your driver and checked the compatibility with my code.
Hello,
Sorry for posting in this thread, but my question is somehow related to subject.
I’m trying to make W5500 work with software FreeBSD stack in EcOS using socket 0 in MACRAW mode and I had some questions about interrupts. As I understand it, RECV interrupt in Sn_IR occurs after RECV cmd was called, and I need to poll Sn_RX_RSR register to make sure some data in rx_buf before I call RECV cmd. But, in OS I can’t admit myself to poll Sn_RX_RSR forever, just want interrupt to set up when any packet received by the chip. Are there any ways to solve my problem?
Sn_IR(RECV) bit is set after some pakets is incoming. So This bit is used in your ISR.
If you want to use the interrupt service routine, You just should set your RX_FLAG variables when Sn_IR(RECV)=1 in your ISR and check RX_FLAG is 1 or not in your main task.
We are not recommend that the receiving data is processed in ISR. Because W5500 interrupt are overlaped by same or another event, You should process IR & Sn_IR as fast as possible. So, By using RX_FLAG or other variables, You can process IR & Sn_IR as fast as possible.
Assume that you use with flag such as RX_FLAG, TX_FLAG and TIMEOUT_FLAG.
In Your main task or thread for processing data, You just check the flags. If flag are set, you can read the related registers such as Sn_RX_RSR. No need to polling the registers if you use flag variables.