20% chance of Ping Timeout on 100M Ethernet - Page 1
Forum section: electronics / general

author: tilblackout
author_rank: Contributor
timestamp: December 01, 2023, 10:36:34 am
content: Hello everyone,On my development board, I'm using the KSZ8051 as the Ethernet chip, and the official manual can be found at:https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/KSZ8051MNL-RNL-10BASE-T-100BASE-TX-Automotive-Physical-Layer-Transceiver-DS00002310B.pdfThe CPU I used is I.MX RT1170 from NXP, which provides SDK routines for the KSZ8081. After comparing the registers of the two chips, I found that no modifications are needed in the initialization code.In the schematic, I forgot to add pull-up resistors for MDC and MDIO during hardware design. As a temporary solution before making the next board revision, I used software pull-ups on the MCU's internal GPIO, and successfully initialized the chip.The computer can recognize the 100M Ethernet, but when pinging my board, there is a 20% chance of timeout.Below is the schematicWhat could be the reason for this?I would greatly appreciate any assistance.

author: eleguy
author_rank: Regular Contributor
timestamp: December 06, 2023, 01:04:01 pm
content: 1) Where do you terminate ethernet differential pair(s) with 100 ohms? Or did I miss it when quickly checking the schematics.2) Did you do impedance controlled board?

author: westfw
author_rank: Super Contributor
timestamp: December 06, 2023, 05:00:40 pm
content: QuoteSo "something" sends 100 ping packets, and gets 80 replies?Does your board see 100 packets (+ a couple for ARP/etc), or 80 packets? (ie, is it a reception problem, or a response problem?)

author: agehall
author_rank: Frequent Contributor
timestamp: December 06, 2023, 06:36:43 pm
content: It usually isn’t the problem, but do be aware that ICMP PING isn’t exactly a priority for any network stack so it may be that packets are just ignored.If you want to be 110% sure you have a problem, measure TCP retransmission rates or something along those lines.

author: tilblackout
author_rank: Contributor
timestamp: December 08, 2023, 03:16:09 am
content: Quote from: westfw on December 06, 2023, 05:00:40 pmAs shown in the Wireshark packet capture below, my WIN10 computer sent four ping packets, but for the third packet, there was no response from the KSZ8051 on the board.

author: tilblackout
author_rank: Contributor
timestamp: December 08, 2023, 03:21:04 am
content: Quote from: agehall on December 06, 2023, 06:36:43 pmWhen I ping the KSZ8051 from WIN10, there is no packet retransmission on the WIN10 side. It's just that the KSZ8051 is not responding, and I feel like the KSZ8051 did not receive the ping packets.

author: tilblackout
author_rank: Contributor
timestamp: December 08, 2023, 04:32:56 am
content: Thank you, I have resolved the issue. It was a clock-related problem. The clock for KSZ8051 and the ENET clock in the CPU should be synchronized; otherwise, there is a chance of ping failure due to clock discrepancies.

author: agehall
author_rank: Frequent Contributor
timestamp: December 08, 2023, 05:53:23 am
content: Quote from: tilblackout on December 08, 2023, 03:21:04 amI know you’ve solved this, but for future reference, there are should not be any retransmissions in ICMP PING. Retransmission is something that is typically handled by higher layers in the networking stack, if applicable.