Set resetReasonData without rebooting?

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!

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().

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.

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