Project setup:
ADIN1110EBZ 10BASE-T1L Ethernet MAC-PHY Evaluation board
ESP32-C6 with ESP-IDF V5.2 (using example code ‘Ethernet Basic’ as baseline)
ADIN1100EBZ Media converter Evaluation board
ESP32 == SPI == ADIN1110EBZ == SPE == ADIN1100EBZ == Router
Summary of problem:
Despite receiving an IP address via DHCP I am unable to ping the ESP32. ARP response message appears to be sent by the ADIN1110 but is not seen on mirrored-port by wireshark.
The ADIN1110 MAC shows Undersize frame in the Frame Checker.
Detail and log information:
I am using the ADIN1110 with an ESP32 over the SPI interface. The baseline for my code is an ESP example project 'Ethernet basic' (not the Analog Devices driver code).
The ESP-32 is successfully communicating with the MAC/PHY and I am able to obtain an assigned IP address via DHCP from a local router. I have mirrored the port on the router so that I can monitor all traffic with Wireshark.
I can see all of the DHCP messages (Discover, Offer, Request and Ack) in Wireshark so I know that both Tx and Rx messages are working.
Although I have an assigned IP address I am unable to ping the ESP32.
ARP messages from the router are received at the ESP in the LwIP stack and I can verify that the ARP reply is formed ready for reply. Following the transmission the TX_RDY is asserted. However, I do not see the ARP reply on Wireshark.
This is the ARP reply message for transmission at the ESP32:
XX XX XX XX XX XX MAC Address of the TPLink Router
YY YY YY YY YY YY MAC Address of the ESP32
08 06 ARP
00 01 Ethernet
08 00 IPv4
06 Hardware size
04 Protocol size
00 02 Reply
YY YY YY YY YY YY Sender MAC address (ESP32)
C0 A8 00 79 Sender IP address (192.168.0.121)
XX XX XX XX XX XX Target MAC Address (TPLink Router)
C0 A8 00 01 Target IP address (192.168.0.1)
The message is 42 bytes, to which I add the 2-byte header and this is written to the TX_FSIZE register. CRC_APPEND is set so that the CRC is added by the MAC.
Debug output from the ESP32:
D (20072) lwip: etharp_input: incoming ARP request
D (20072) lwip: pbuf_alloc(length=28)
D (20082) lwip: pbuf_alloc(length=28) == 0x40811384
D (20082) lwip: etharp_raw: sending raw ARP packet.
D (20092) lwip: pbuf_add_header: old 0x408113a4 new 0x40811396 (14)
D (20092) lwip: ethernet_output: sending packet 0x40811384
I (20102) adin1110-mac: emac_adin1110_transmit
D (20102) adin1110-mac: transmitting frame of size 42
D (20112) adin1110-mac: transmit length 44
D (20112) adin1110-mac: free_space (bytes) 8190
D (20122) adin1110-mac: TX_FSIZE written with 44
Debug from the ADIN1110 Frame checker. Configured to check transmitted frames from the MAC – The undersize count is not zero:
I (21702) adin1110-phy: Frame checker
D (21712) adin1110-mac: emac_adin1110_write_phy_reg
D (21712) adin1110-mac: emac_adin1110_write_phy_reg
D (21722) adin1110-phy: RX_ERR_CNT 0x0
D (21722) adin1110-phy: Frame check TRANSMITTED FRAMES from MAC
D (21732) adin1110-phy: FC_FRM_CNT_H: 0x0 FC_FRM_CNT_L: 0x0
D (21732) adin1110-phy: FC_LEN_ERR_CNT: 0x0 FC_ALGN_ERR_CNT: 0x0
D (21742) adin1110-phy: FC_SYMB_ERR_CNT: 0x0 FC_OSZ_CNT: 0x0
D (21742) adin1110-phy: FC_USZ_CNT: 0x2 FC_ODD_CNT: 0x0
D (21752) adin1110-phy: FC_ODD_PRE_CNT: 0x0 FC_FALSE_CARRIER_CNT: 0x0
D (21762) adin1110-phy: AN_STATUS 0x2c
Questions:
Are Undersized messages, as reported in the FC_USZ_CNT register, transmitted by the ADIN1110 MAC/PHY or are they ignored?
The ARP response looks OK to me - I appreciate that it is < 64 bytes at this point but I quess that it is padded at some point to Ethernet frame size – why would this be reported as undersize?
I assume that as I am not seeing the ARP response following the DHCP IP assignment that I am unable to ping the device.
Thanks in advance for any help and advice.
Added ADIN1110 to title
[edited by: breakpoint926 at 7:55 AM (GMT -4) on 14 Jun 2024]