PaulStoffregen / Ethernet

Ethernet library for Teensy (Wiznet W5100 / W5200 / W5500)
http://www.pjrc.com/teensy/td_libs_Ethernet.html
130 stars 83 forks source link

Removal of reset signal code is causing support requests #9

Closed macaba closed 6 years ago

macaba commented 7 years ago

Following commit https://github.com/PaulStoffregen/Ethernet/commit/ee1eacf88b4c7d5e0b0a7f7ea1c94cc8ce8de7e1 the lack of reset signal has caused many forum threads:

https://forum.pjrc.com/threads/38780-wiz820io-server-not-initializing-to-fixed-IP https://forum.pjrc.com/threads/41958-Ethernet-begin-hangs-after-power-cyle-in-Nov-29-2016-release https://forum.pjrc.com/threads/42008-ethernet-init-issues-3-2-and-3-6

The exact code that was removed (and lack thereof causes this issue):

#define W5200_RESET_PIN  9

#ifdef W5200_RESET_PIN
  pinMode(W5200_RESET_PIN, OUTPUT);
  digitalWrite(W5200_RESET_PIN, LOW);
  delay(1);
  digitalWrite(W5200_RESET_PIN, HIGH);
  delay(150);
#endif

I've suggested a possible compromise in pull request https://github.com/PaulStoffregen/Ethernet/pull/8 but it still requires the user to know that they would need to add #define WIZ_RESET.

I'm not sure what the correct answer is, I defer to your expertise.

macaba commented 7 years ago

Another thread: https://forum.pjrc.com/threads/41936-Teensy-3-6-resetting-with-Serial-Wiz820-Ethernet

PaulStoffregen commented 6 years ago

I'm going to consider this problem "solved" by the addition of reset hardware on the adaptor boards and the fact that W5200 has been replaced by W5500 which has much better startup behavior.