Ethernet
Ethernet copied to clipboard
W5100Class::softReset() failes always when PoE module equipped.
Hardware
- Arduino Uno (any rev.)
- Genuine Arduino Ethernet Shield Rev 2, equipped with PoE receiver module
Problem
Chip type detection such as W5100Class::isW5100()
W5100Class::isW5500()
and so on fails except in case of power on reset of W5500, due to W5100Class::softReset()
returns 0
. softReset()
will succeed always when PoE receiver module is not equipped.
Solution
Increase wait count to 200 ms in W5100Class::softReset()
, such as:
uint8_t W5100Class::softReset(void)
{
uint16_t count=0;
//Serial.println("WIZnet soft reset");
// write to reset bit
writeMR(0x80);
// then wait for soft reset to complete
do {
uint8_t mr = readMR();
//Serial.print("mr=");
//Serial.println(mr, HEX);
if (mr == 0) return 1;
delay(1);
} while (++count < 200);
return 0;
}
I'm not sure it's really OK to 200.