Skip to content

Commit aa2cf45

Browse files
committed
Update ResetReason.ino
1 parent 777d661 commit aa2cf45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/ESP32/examples/ResetReason/ResetReason.ino

+4
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ void setup() {
9191

9292
// Set ESP32 to go to deep sleep to see a variation
9393
// in the reset reason. Device will sleep for 5 seconds.
94+
#if CONFIG_IDF_TARGET_ESP32C3
95+
esp_sleep_pd_config(ESP_PD_DOMAIN_RC_FAST, ESP_PD_OPTION_OFF);
96+
#else
9497
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
98+
#endif
9599
Serial.println("Going to sleep");
96100
esp_deep_sleep(5 * uS_TO_S_FACTOR);
97101
}

0 commit comments

Comments
 (0)