# Post Hard Fault safe mode

**URL:** <https://community.particle.io/t/post-hard-fault-safe-mode/43976>\
**Category:** Troubleshooting\
**Created:** [September 13, 2018, 1:26pm UTC](https://community.particle.io/t/post-hard-fault-safe-mode/43976 "2018-09-13T13:26:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahigginscassidy](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ahigginscassidy/32/17720_2.png) [@ahigginscassidy](https://community.particle.io/u/ahigginscassidy)\
**Post date:** [September 13, 2018, 1:26pm UTC](https://community.particle.io/t/post-hard-fault-safe-mode/43976/1 "2018-09-13T13:26:28Z")

</div>

Hey,

I have some devices that are hitting a Hard Fault before calling particle connect.  
I have solved that problem, but…  
I’ve been scouring the forums and haven’t found a remote solution to fixing this remotely.  
The devices in question are very difficult to get to physically.

Is there a setting or something to enter safe mode on “next boot” after a Hard Fault?  
Basically we want to be able to OTA these devices if we flash a bad firmware that causes a Hard Fault.  
(We’re improving our upgrade testing, but this would be a great recovery option if the worst happens).

Thanks!

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [September 13, 2018, 1:33pm UTC](https://community.particle.io/t/post-hard-fault-safe-mode/43976/2 "2018-09-13T13:33:15Z")

</div>

In setup() of your firmware you can use the [reset reason](https://docs.particle.io/reference/firmware/#reset-reason) and check for RESET\_REASON\_PANIC.

If so you could enter safe mode by using [System.enterSafeMode()](https://docs.particle.io/reference/firmware/#entersafemode-).

---

<div class="post-metadata">

**Author:** ![ahigginscassidy](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ahigginscassidy/32/17720_2.png) [@ahigginscassidy](https://community.particle.io/u/ahigginscassidy)\
**Post date:** [September 13, 2018, 2:27pm UTC](https://community.particle.io/t/post-hard-fault-safe-mode/43976/3 "2018-09-13T14:27:57Z")

</div>

Awesome, that sounds like a viable strategy!
