mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
@@ -323,6 +323,9 @@ void start_cpu0_default(void)
|
||||
do_global_ctors();
|
||||
#if CONFIG_INT_WDT
|
||||
esp_int_wdt_init();
|
||||
#endif
|
||||
#if CONFIG_TASK_WDT
|
||||
esp_task_wdt_init();
|
||||
#endif
|
||||
esp_cache_err_int_init();
|
||||
esp_crosscore_int_init();
|
||||
@@ -397,30 +400,6 @@ static void main_task(void* args)
|
||||
#endif
|
||||
//Enable allocation in region where the startup stacks were located.
|
||||
heap_caps_enable_nonos_stack_heaps();
|
||||
|
||||
//Initialize task wdt
|
||||
#ifdef CONFIG_TASK_WDT
|
||||
#ifdef CONFIG_TASK_WDT_PANIC
|
||||
esp_task_wdt_init(CONFIG_TASK_WDT_TIMEOUT_S, true);
|
||||
#else
|
||||
esp_task_wdt_init(CONFIG_TASK_WDT_TIMEOUT_S, false);
|
||||
#endif
|
||||
#endif
|
||||
//Add IDLE 0 to task wdt
|
||||
#ifdef CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0
|
||||
TaskHandle_t idle_0 = xTaskGetIdleTaskHandleForCPU(0);
|
||||
if(idle_0 != NULL){
|
||||
esp_task_wdt_add(idle_0);
|
||||
}
|
||||
#endif
|
||||
//Add IDLE 1 to task wdt
|
||||
#ifdef CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1
|
||||
TaskHandle_t idle_1 = xTaskGetIdleTaskHandleForCPU(1);
|
||||
if(idle_1 != NULL){
|
||||
esp_task_wdt_add(idle_1);
|
||||
}
|
||||
#endif
|
||||
|
||||
app_main();
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user