I am having a problem with sketches restarting. I think I have identified the culprit: Serial.print. When I enable tracing, I generate lots of Serial.print diagnostic messages; but the code also restarts after one time through Loop. Can anybody explain why this happens and what I can do about it?
The symptom suggests that you are running out of memory (SRAM) or writing to memory that you do not own (writing past the end of an array). But without seeing your code I can.only guess.