I am using System.reset() using the IDE and can confirm that it works.
I’ve made a small webserver, but the Spark Core is far from stable. Most often the Core stops functioning properly within ten or twenty minutes, taking long times for the core to reset by itself.
To get more insight into its behavior I have added a watchdog function to my loop() which checks every second to see when it was last called. If the function was called more than three seconds ago, it prints a warning message to the serial connection and to a logfile on SD. If it was called more than ten seconds ago, it also prints the message (which mentions the actual duration of the outage) and subsequently call the System.reset function.
In the past days my logfile has logged many of these watchdog resets. I’ve noticed that most of these watchdog resets are preceded by a 60 second outage. Not, 57 seconds, not 62 seconds, always 60 seconds. To be more precise it also prints the milliseconds and then I get these kind of outage durations: 60.0, 60.880, 60.135, 60.679, etc.In other words: these outages took always 60 seconds (rounded to the second) and then control was returned to my loop. In other occasions I sometimes also get 20 second outages, but those are way less frequent.
I can only conclude that there is a 60 second blocking time-out somewhere in the Spark Core firmwarecode or perhaps the WiFi driver, which after time-out returns control to the user code. In earlier versions my server would just not respond for long times and sometimes reset automatically (I guess as instigated by the Spark firmware).
Unfortunately this instability makes the Spark Core unusable for my production environment. Hopefully the firmware will be improved soon.
To investigate a bit more, I went back to the beginning today. I took the sample blink program, added a tiny beep (using an active piezo buzzer) and adjusted it to blink three times, followed by a beep every second. The loop contains nothing but these blinks and the beep. All delays within the loop total to one second and all other code is only the digitalWrite of either the blue LED, or of the buzzer. In summary: this code should give a regular beep every second, accompanied by thee blinks.
I found that when running this code (not containing any TCP calls) the stability of the Core was much better, but the beep was still not as regular as it should. It sometimes skipped a second or more, I guess when executing Spark code.
I didn’t keep it running for a very long time, but long enough while typing this response to notice the irregularities…