Last active
December 19, 2021 00:10
-
-
Save aovestdipaperino/e4469ec1fd000358bd0a8e207908b16a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "soc/rtc_wdt.h" | |
void __attribute__((noreturn)) call_start_cpu0(void) | |
{ | |
rtc_wdt_protect_off(); //Disable RTC WDT write protection | |
//Set stage 0 to trigger a system reset after 1000ms | |
rtc_wdt_set_stage(RTC_WDT_STAGE0, RTC_WDT_STAGE_ACTION_RESET_RTC); // RTC_WDT_STAGE_ACTION_RESET_SYSTEM for regular reset. | |
rtc_wdt_set_time(RTC_WDT_STAGE0, 4000); | |
rtc_wdt_enable(); //Start the RTC WDT timer | |
rtc_wdt_protect_on(); //Enable RTC WDT write protection | |
while(1) { | |
ets_delay_us(1000000); | |
ets_printf("ENZO WAS HERE.\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment