# SYSTEM MODE or System Thread

**URL:** <https://community.particle.io/t/system-mode-or-system-thread/25662>\
**Category:** Firmware\
**Created:** [September 7, 2016, 1:21pm UTC](https://community.particle.io/t/system-mode-or-system-thread/25662 "2016-09-07T13:21:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianw13a](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@brianw13a](https://community.particle.io/u/brianw13a)\
**Post date:** [September 7, 2016, 1:21pm UTC](https://community.particle.io/t/system-mode-or-system-thread/25662/1 "2016-09-07T13:21:25Z")

</div>

I’ll try and keep this brief. My process can run up to 2 days so it’s important that the logic is not interrupted during this time. Currently, I have an atmega running the logic and communicating via serial to a photon which then sends data via WiFi. This has worked out very well however I’d like to eliminate the atmega.

Ideally, I’d like to turn off the Particle Cloud, have the firmware manage the WiFi connection, and run my application logic without it restarting because of a WiFi connection loss. From the documentation, it looks like I could accomplish this with System Mode however my previous testing has not bore this out. Now it seems there is a System Thread that can be enabled that might be close enough.

Any thoughts or suggestions?

Thanks - bdw

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [September 7, 2016, 5:46pm UTC](https://community.particle.io/t/system-mode-or-system-thread/25662/2 "2016-09-07T17:46:28Z")

</div>

@brianw13a, use SYSTEM\_MODE(MANUAL) and control both WiFi and Cloud yourself. You can use SYSYTEM\_THREAD(ENABLED) to allow the user app to run in its own thread. This provides non-blocking WiFi and Cloud control in your code, except of course, where you are waiting on connections.
