Revert "esp32: New Task Watchdog API"

This reverts commit 616baa239d.
This commit is contained in:
Jeroen Domburg
2017-09-30 18:07:19 +08:00
parent a3731902f5
commit b6a2bd1184
12 changed files with 192 additions and 643 deletions

View File

@@ -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);
}