[ethernet] Fix Starting/Stopped/Starting log on RP2040 boot

Don't set started_ = true in setup(). Let the link polling in
loop() set it when the W5500 PHY link is actually up. Previously,
setting it immediately caused a spurious state transition because
the W5500 needs time after begin() before the link is ready.
This commit is contained in:
J. Nick Koston
2026-03-14 17:16:49 -10:00
parent 50b0e163d5
commit 2dd12de1dc
@@ -75,8 +75,10 @@ void EthernetComponent::setup() {
// via __addEthernetPacketHandler when no interrupt pin is used,
// or via GPIO interrupt when one is provided.
// Mark as started - connection will be detected in loop()
this->started_ = true;
// Don't set started_ here — let the link polling in loop() set it
// when the W5500 link is actually up. Setting it prematurely causes
// a "Starting → Stopped → Starting" log sequence because the W5500
// needs time after begin() before the PHY link is ready.
}
void EthernetComponent::loop() {