I’am using wiznet W5300 in MACRAW mode with software UDP socket and W5300 hardware ICMP for ping answers.
I noticed ICMP ping reply data corruption after UDP communication via MACRAW socket.
In ICMP reply ICMP Fields Type, Code and Checksum are correct.
ICM Fields Identifier, Sequence number and Data are corrupted.
Error occures only after W5300 receives UDP packet, after W5300 transmitts UDP - ICMP reply is ok.
Wireshark capture file in attachment. Screenshots below.
W5300 ip 192.168.200.29, PC ip 192.168.200.130.
W5300 configuration:
SOCKET0 - MACRAW, 54k rx/tx mem,
SOCKET1-4 - TCP/IP 4*2k rx/tx mem,
SOCKET5 - UDP 2k rx/tx mem
IP 192.168.200.29
MASK 255.255.255.0
GW 192.168.200.254
16 bit bus mode, FIFO SWAP Bit set.
Ping from PC to W5300. After UDP packet send (frame #8) ping reply (frame #10) is corrupted.
Wireshark packet sequence screenshots:
Wireshark ICMP ping corrupted packet details:
Id, Sequence and Data are corrupted. Data partly can be identified as previously sent UDP packet (‘public’ community string).
I configured W5300 SOCKET0 in macraw only. No more sockets configured.
I configured W5300 MAC and IP adress. W5300 answers ICMP ping hardware.
I only receive macraw packets, make no send activity.
After I send any UDP packet from PC to IP address W5300 is configured the next ICMP answer data from W5300 was always corrupted.
ICMP reply data starting from ICMP Identifier field contains exacly UDP received packet data starting from IP Identification field.
Moreover when I only configured W5300 SOCKET0 in MACRAW mode, configured IP and halted CPU I got the same corrupted ICMP answer after every UDP packet was sent to W5300. W5300 process ICMP hardware, no software processing involved on MACRAW SOCKET0.
So there were no W5300 SOCKET0 activity and buffer operations but ICMP answer data corrupted always after UDP packet received by W5300.
I suppose you have problem with ICMP ping in macraw mode.