# How do I enable the reset reason feature?

**URL:** <https://community.particle.io/t/how-do-i-enable-the-reset-reason-feature/35413>\
**Category:** Firmware\
**Created:** [August 16, 2017, 7:20pm UTC](https://community.particle.io/t/how-do-i-enable-the-reset-reason-feature/35413 "2017-08-16T19:20:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixgalindo](https://avatars.discourse-cdn.com/v4/letter/f/cc9497/32.png) [@felixgalindo](https://community.particle.io/u/felixgalindo)\
**Post date:** [August 16, 2017, 7:20pm UTC](https://community.particle.io/t/how-do-i-enable-the-reset-reason-feature/35413/1 "2017-08-16T19:20:52Z")

</div>

I am running in “Semi Automatic” system mode and have system thread enabled.

Thanks.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [August 16, 2017, 8:44pm UTC](https://community.particle.io/t/how-do-i-enable-the-reset-reason-feature/35413/2 "2017-08-16T20:44:10Z")

</div>

You mean you are searching this  
[https://docs.particle.io/reference/firmware/photon/#reset-reason](https://docs.particle.io/reference/firmware/photon/#reset-reason)

This came up when using the search term _reset reason_ via the search feature in the docs - this feature is actually open and meant for public use 😉

---

<div class="post-metadata">

**Author:** ![felixgalindo](https://avatars.discourse-cdn.com/v4/letter/f/cc9497/32.png) [@felixgalindo](https://community.particle.io/u/felixgalindo)\
**Post date:** [August 16, 2017, 10:09pm UTC](https://community.particle.io/t/how-do-i-enable-the-reset-reason-feature/35413/3 "2017-08-16T22:09:37Z")

</div>

I am aware of the doc but I don’t see any info on how to use it in “Semi Automatic” system mode. It does not work for me in that mode.

```
STARTUP(System.enableFeature(FEATURE_RESET_INFO));
SYSTEM_THREAD(ENABLED); 
SYSTEM_MODE(SEMI_AUTOMATIC);
```

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [August 17, 2017, 6:15am UTC](https://community.particle.io/t/how-do-i-enable-the-reset-reason-feature/35413/4 "2017-08-17T06:15:08Z")

</div>

I wouldn’t see why the system mode would impact this feature 😕

@rickkas7, an ideas?

---

<div class="post-metadata">

**Author:** ![mikemoy](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@mikemoy](https://community.particle.io/u/mikemoy)\
**Post date:** [August 17, 2017, 12:14pm UTC](https://community.particle.io/t/how-do-i-enable-the-reset-reason-feature/35413/5 "2017-08-17T12:14:26Z")

</div>

I use this in all my apps. Works fine for me in all the MODES.

```
void resetReason(void)
{

	Serial.printf("Reset Reson is: ");

	switch( System.resetReason() )
	{
		case RESET_REASON_PIN_RESET: Serial.printf("PIN_RESET"); break;
		case RESET_REASON_POWER_MANAGEMENT:	Serial.printf("POWER_MANAGEMENT");	break;
		case RESET_REASON_POWER_DOWN: Serial.printf("POWER_DOWN"); break;
		case RESET_REASON_POWER_BROWNOUT:	Serial.printf("POWER_BROWNOUT"); break;
		case RESET_REASON_WATCHDOG: Serial.printf("WATCHDOG"); break;
		case RESET_REASON_UPDATE: Serial.printf("UPDATE"); break;
		case RESET_REASON_UPDATE_TIMEOUT:	Serial.printf("UPDATE_TIMEOUT"); break;
		case RESET_REASON_FACTORY_RESET:	Serial.printf("FACTORY_RESET"); break;
		case RESET_REASON_DFU_MODE: Serial.printf("DFU_MODE"); break;
		case RESET_REASON_PANIC: Serial.printf("PANIC"); break;
		case RESET_REASON_USER: Serial.printf("USER"); break;
		case RESET_REASON_UNKNOWN: Serial.printf("UNKNOWN"); break;
		case RESET_REASON_NONE: Serial.printf("NONE"); break;
	}

	Serial.printf("\r\n");

}

void setup()
{
	// Show why we reset
	resetReason();

}
```
