mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 18:18:43 +00:00
[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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user