arduino_uip icon indicating copy to clipboard operation
arduino_uip copied to clipboard

UdpNtpClient and WebServer - causing reset - UIPEthernet_v1.09_ext - extended API

Open stevstrong opened this issue 10 years ago • 1 comments

Hi, I don't know whether am doing something prohibited, it definetly should not work, am I doing something wrong or it is just an issue... I am using a web server together with a web client and NTP client on Arduino Pro Mini with Enc28j60, both operating with 3.3V stabilized, capable of 1A. The problem I have is that after the NTP time is read out, accessing the web server form my PC causes the Ardunio to reset. The SW works when the UDP part is not used. In this case I can access the web server from my PC and the Arduino can access another server on my network without a problem, in time division manner. When UDP gets activated, the time is captured and displayed correctly each 10 seconds, no problem. The reset occures as soon as the web server is accessed, or data is received over the web client pipe. After reset, I only get the startup messsages in the serial monitor, nothing else works. HW reset needed. For reference I attach here my code:


https://github.com/stevstrong/HomeServer/blob/master/home_server.ino


Can anyone imagine what am I doing wrong?

Thank you in advance.

stevstrong avatar Dec 04 '14 22:12 stevstrong

UPDATE: I made some more research on this issue. Measured the free RAM on main loop level with this function (http://playground.arduino.cc/Code/AvailableMemory), this shows 530 bytes. Furthermore, after reset-restart the ATmega328P still accesses the ENC28j (SPI clock still showing some pulses repeatedly each 100ms) but the serial terminal is dead. When accessing the web server from PC the SPI the SPI clocks will be more frequent for some time, meaning the main loop somehow works, data is being received.

Well, I don't know if it makes sense to do more actions in this direction, I would highly appreciate some expert answer on this issue. Thank you again.

stevstrong avatar Dec 05 '14 18:12 stevstrong