Skip to content

Instantly share code, notes, and snippets.

@aovestdipaperino
Last active December 19, 2021 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aovestdipaperino/e4469ec1fd000358bd0a8e207908b16a to your computer and use it in GitHub Desktop.
Save aovestdipaperino/e4469ec1fd000358bd0a8e207908b16a to your computer and use it in GitHub Desktop.
#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