# Set resetReasonData without rebooting?

**URL:** <https://community.particle.io/t/set-resetreasondata-without-rebooting/65876>\
**Category:** Firmware\
**Created:** [November 27, 2023, 8:15pm UTC](https://community.particle.io/t/set-resetreasondata-without-rebooting/65876 "2023-11-27T20:15:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ColinVT](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@ColinVT](https://community.particle.io/u/ColinVT)\
**Post date:** [November 27, 2023, 8:15pm UTC](https://community.particle.io/t/set-resetreasondata-without-rebooting/65876/1 "2023-11-27T20:15:05Z")

</div>

Hello!  
As the title states, I am looking for a way to set the resetReasonData value without rebooting the device. I use resetReasonData in order for the device to keep track of how many times it has rebooted since the last time it successfully connected to the cloud, but I noticed during development that if a system panic happens for example, then the device does not go through my "graceful" shutdown/reboot routine and therefore the resetReasonData is never being cleared. Is there any way to set this value without having to call System.reset() ?  
Thanks in advance!

---

<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:** [November 27, 2023, 9:13pm UTC](https://community.particle.io/t/set-resetreasondata-without-rebooting/65876/2 "2023-11-27T21:13:02Z")

</div>

I am 90% sure the answer is no. I looked at the Device OS source and there doesn't appears to be an exposed function that would allow the field to be set except from System.reset().

---

<div class="post-metadata">

**Author:** ![ColinVT](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@ColinVT](https://community.particle.io/u/ColinVT)\
**Post date:** [November 29, 2023, 4:48pm UTC](https://community.particle.io/t/set-resetreasondata-without-rebooting/65876/3 "2023-11-29T16:48:45Z")

</div>

Thanks for the info!

Do you think that is something that could be exposed, or even just the addition of a function to set it back to default? To me it seems like a potential edge case worth covering in that the device may be booting up from an ungraceful shutdown but still have the resetReasonData from 2 (or more potentially) boots prior.

Obviously I could do a "clean" reboot once the device connects to clear the value but that feels.... wrong haha.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [May 30, 2024, 4:48am UTC](https://community.particle.io/t/set-resetreasondata-without-rebooting/65876/4 "2024-05-30T04:48:50Z")

</div>

Closed on May 30, 2024, 4:48am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
