Ethernet Module needs hard reset to receive after upload?

I'm using the ethernet module to send data to a Raspberry Pi and to get time updates from an NTP server running on the RPi.  When I upload my sketch to the Industruino Ind I/O it will send data but cannot receive the NTP (UDP) messages.  If I power off the Ind I/O and power back on everything works.  My sketch waits for the serial monitor to open, so if I upload the sketch, wait until the upload is complete, press the reset button on the ethernet module, then open the serial monitor, everything works.  So, it looks like the ethernet module requires a hard reset after an upload to be able to receive.  Is this a hardware problem, a library problem, or a feature?

Gary Huband
Gary Huband
57
| 4 1 1
Asked on 3/3/16, 5:30 PM
1
vote
3673 Views

Ok, I finally have this working, here's the code snippet:

const int RESET_PIN = 5;

void setup()
{  

  // Reset ethernet module
  pinMode(RESET_PIN, OUTPUT);

  digitalWrite(RESET_PIN, HIGH);
  digitalWrite(RESET_PIN, LOW);

  delayMicroseconds(50);
  digitalWrite(RESET_PIN, HIGH);
  // Wait for the module to reset
  delay(400);
  
 // Ethernet setup  
  Ethernet.begin(mac, localIp, dnsServerIp, gatewayIp, subnetIp);
  int udpStatus = Udp.begin(localPort);
  // give Ethernet shield one second to initialize
  delay(1000);
}

 

Gary Huband
Gary Huband
57
| 4 1 1
Answered on 3/7/16, 4:28 PM
0
vote

Dear Gary,

Indeed the Ethernet module would need a reset or power cycle after uploading a new sketch in order to work correctly.

As an alternative to manually resetting the module you can also initiate a reset from within sketch control. Nearby the reset button on the ethernet module you will find a solder jumper labelled "ext-rst": if you close this jumper with some solder it will connect the reset chip's manual reset pin to pin D5 of the Industruino. By writing a LOW for say a couple of miliseconds to this pin, it will trigger the reset chip to reset the ethernet chip.

Loic De Buck
Loic De Buck
1263
| 3 1 3
Answered on 3/6/16, 4:48 PM
0
vote

I confirmed the above with a second ethernet module. I connected the ext_rst pads with solder. The above code does reset the ethernet module, but I cannot receive even after a power cycle. Any suggestions?

Gary Huband
on 3/15/16, 8:16 PM

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

20 follower(s)

Stats

Asked: 3/3/16, 5:30 PM
Seen: 3673 times
Last updated: 3/15/16, 8:54 PM