I am writing a driver for the w5500 for rp2040. so far, my chip responds to ping requests from my PC on my LAN, responds to ARP requests from my PC, and is sending UDP Packets over my LAN with the correct payload, src, and dst ip addresses. However, the chip refuses to send an ARP request of it’s own (force ARP is on as well), which means the destination MAC of every packet is all zeroes. What I am doing is writing all my data to my TX buffer and simply writing the SEND command to sn_cr. Wondering if I am missing any steps here. From the wiznet w5500 driver it seemed that I was doing it right.
(example UDP packet being sent)
(example ARP reply from w5500)
Can you explain in more detail? How do you know it refuses? You have error code from the chip? Or you mean it does not send ARP when you think it must? If yes, then when you think it must send ARP request? Your second pic shows 2.50 asking for MAC address and 2.100 responds with its MAC address.
It does not send ARP request when I believe it should. I am trying to send UDP packets from the chip (2.100) to my pc (2.50). I was trying to display that 2.100 responds to arp requests on the LAN, but when I send packets, does not send them itself
arp reply is correct with the mac address of 2.100. In short, I expect an ARP request for the MAC of 2.50 from 2.100 when udp packets are sent
SEND (0x20) must send ARP request before the first UDP datagram is sent, but it does not happen, or something blocks chip doing so. Can you dump all common registers and registers of socket you use into hex and check them/post here?
Sorry for the delayed response, this is the values of all registers after sending one packet over UDP using socket 1
w5500_gar: 0xc0 0xa8 0x02 0x32
w5500_subr: 0xff 0xff 0xff 0x00
w5500_shar: 0x08 0xdc 0x0a 0x01 0x10 0x18
w5500_sipr: 0xc0 0xa8 0x02 0x64
w5500_intLevel: 0x00 0x00
w5500_rtr: 0x07 0xd0
w5500_phar: 0x00 0x00 0x00 0x00 0x00 0x00
w5500_psid: 0x00 0x00
w5500_pmru: 0xff 0xff
w5500_uipr: 0x00 0x00 0x00 0x00
w5500_uportr: 0x00 0x00
**Socket 1 Registers **
w5500_socket_sport: 0x13 0x88
w5500_socket_dhar: 0x00 0x00 0x00 0x00 0x00 0x00
w5500_socket_dipr: 0xc0 0xa8 0x02 0x32
w5500_socket_dport: 0x14 0xe9
w5500_socket_mssr: 0x05 0xc0
w5500_socket_tx_fsr: 0x20 0x00
w5500_socket_tx_rd: 0x00 0x04
w5500_socket_tx_wr: 0x00 0x04
w5500_socket_rsr: 0x00 0x00
w5500_socket_rx_rd: 0x00 0x00
w5500_socket_rx_wr: 0x00 0x00
w5500_socket_frag: 0x40 0x00
Also, SEND command is (0x20), I noticed you made a mistake in an earlier reply
Try turning off the multicast mode in S1_MR. Also ensure that memory allocation is correct (S1 uses half of available buffer memory).
Right, thank you. Corrected.
I solved it, turns out that I had multicast enabled which defaulted the chip to using IGMP instead of ARP. Thank you for all the help!