From 3c6dd27ad5a740afd9604ef6de096ea767816b4b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 19 Aug 2026 15:15:54 -0500 Subject: [PATCH] Note the tradeoff behind the edge decoder baud cutoff --- esphome/components/uart/uart_component_esp8266.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esphome/components/uart/uart_component_esp8266.cpp b/esphome/components/uart/uart_component_esp8266.cpp index 6226f2bba4..04acf1d43c 100644 --- a/esphome/components/uart/uart_component_esp8266.cpp +++ b/esphome/components/uart/uart_component_esp8266.cpp @@ -15,7 +15,10 @@ namespace esphome::uart { static const char *const TAG = "uart"; -// Edge decoder up to this baud rate, start bit sampler above it. +// Edge decoder up to this baud rate, start bit sampler above it. The cutoff is +// a deliberate tradeoff: the decoder tolerates ~0.25 bit of ISR latency jitter +// (~6.5us at 38400), too tight for higher rates where the sampler's whole byte +// ISR block is short anyway. static constexpr uint32_t SW_SERIAL_EDGE_MODE_MAX_BAUD = 38400; bool ESP8266UartComponent::serial0_in_use = false; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)