From 91a7bad2acb7367b3265b5e5f7f5aadd2e7f9197 Mon Sep 17 00:00:00 2001 From: Juan Domenech Fernandez Date: Sun, 30 Aug 2026 17:29:46 +0100 Subject: [PATCH] Extend 10Base-T decoder to catch wide eye at the beginning of the preable of TX frames --- scopeprotocols/Ethernet10BaseTDecoder.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scopeprotocols/Ethernet10BaseTDecoder.cpp b/scopeprotocols/Ethernet10BaseTDecoder.cpp index 532cac85..9fceaeea 100644 --- a/scopeprotocols/Ethernet10BaseTDecoder.cpp +++ b/scopeprotocols/Ethernet10BaseTDecoder.cpp @@ -93,6 +93,8 @@ void Ethernet10BaseTDecoder::Refresh( const int64_t eye_start = ui_halfwidth - jitter_tol; const int64_t eye_end = ui_halfwidth + jitter_tol; + const int64_t eye_wide_start = ui_width - jitter_tol; + const int64_t eye_wide_end = ui_width + jitter_tol; size_t i = 0; bool done = false; @@ -150,7 +152,11 @@ void Ethernet10BaseTDecoder::Refresh( i++; break; } - if( (delta < eye_start) || (delta > eye_end) ) + // Normal eye for first bit in RX frame (from the network) + bool in_normal_eye = (delta >= eye_start) && (delta <= eye_end); + // Wide eye for first bit in TX frame (from the NIC) + bool in_wide_eye = (delta >= eye_wide_start) && (delta <= eye_wide_end); + if(!in_normal_eye && !in_wide_eye) { LogTrace("Edge was in the wrong place, skipping it and attempting resync\n"); i++;