Installation & Troubleshooting
Topic: Random restarts
(Read 464 times)
Sep 30, 2013, 01:25 am
I am trying to understand what is creating this problem, I have a clone Mega 2560 with a sensor shield v2 and a number of sensors. My sensor test program will randomly resets / reboots where the bootloader restarts the program (i.e. pin 13 flashes) and the serial output on my bluetooth link shows the program has restarted. The system I am connecting to is Windows 7 64 bit, and it would appear that this only happens while the USB is connected, but I am not 100% sure on this. Is this a normal issue while running the IDE under Windows or have I got some other issue to track down?
Re: Random restarts
Sep 30, 2013, 03:31 am
Opening or closing the serial port will cause the board to auto-reset.
It is possible that your application opens the serial port, causing the reset. It is also possible you have some application running in the background on the PC that scans for serial ports, causing the reset.
If your devices aren't properly decoupled (with decoupling capacitors) or draw too much current, it could be a power-related problem.
Lastly, if you are using lots of Strings or character arrays (like with Serial.print()s), you could be running out of SRAM.
Capacitor Expert By Day, Enginerd by night. || Personal Blog: www.baldengineer.com || Electronics Tutorials for Beginners: www.addohms.com