Good day,
After upgrading from IDF V3.1 to V4.1 the watchdog does not behave the same and I can't find documentation relating to the issue I have.
If I run the task_watchdog example and only enable the interrupt watchdog, sdconfig setting below:
CONFIG_ESP_INT_WDT=y
CONFIG_ESP_INT_WDT_TIMEOUT_MS=300
CONFIG_ESP_INT_WDT_CHECK_CPU1=y
# CONFIG_ESP_TASK_WDT is not set
# CONFIG_ESP_PANIC_HANDLER_IRAM is not set
I get the following output:
Initialize TWDT
Delay for 10 seconds
E (6309) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (6309) task_wdt: - IDLE0 (CPU 0)
E (6309) task_wdt: Tasks currently running:
E (6309) task_wdt: CPU 0: IDLE0
E (6309) task_wdt: CPU 1: IDLE1
E (9309) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (9309) task_wdt: - IDLE0 (CPU 0)
E (9309) task_wdt: Tasks currently running:
E (9309) task_wdt: CPU 0: IDLE0
E (9309) task_wdt: CPU 1: IDLE1
E (12309) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (12309) task_wdt: - IDLE0 (CPU 0)
E (12309) task_wdt: Tasks currently running:
E (12309) task_wdt: CPU 0: IDLE0
E (12309) task_wdt: CPU 1: IDLE1
Unsubscribing and deleting tasks
Complete
I then activate the TWDT in the config:
CONFIG_ESP_INT_WDT=y
CONFIG_ESP_INT_WDT_TIMEOUT_MS=300
CONFIG_ESP_INT_WDT_CHECK_CPU1=y
CONFIG_ESP_TASK_WDT=y
CONFIG_ESP_TASK_WDT_PANIC=y
CONFIG_ESP_TASK_WDT_TIMEOUT_S=5
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
and re-running the code I get the following output:
Initialize TWDT
Delay for 10 seconds
E (6306) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (6306) task_wdt: - IDLE0 (CPU 0)
E (6306) task_wdt: Tasks currently running:
E (6306) task_wdt: CPU 0: IDLE0
E (6306) task_wdt: CPU 1: IDLE1
E (9306) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (9306) task_wdt: - IDLE0 (CPU 0)
E (9306) task_wdt: Tasks currently running:
E (9306) task_wdt: CPU 0: IDLE0
E (9306) task_wdt: CPU 1: IDLE1
E (12306) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (12306) task_wdt: - IDLE0 (CPU 0)
E (12306) task_wdt: Tasks currently running:
E (12306) task_wdt: CPU 0: IDLE0
E (12306) task_wdt: CPU 1: IDLE1
Unsubscribing and deleting tasks
Complete
i.e. the same result. I then commented out the line:
//CHECK_ERROR_CODE(esp_task_wdt_reset(), ESP_OK); //Comment this line to trigger a TWDT timeout
and get the same result. So the IDLE task is not resetting the watchdog.
My questions are as follows:
1.) In V3.1 I had the following sdconfig setting:
CONFIG_INT_WDT=y
CONFIG_INT_WDT_TIMEOUT_MS=500
CONFIG_INT_WDT_CHECK_CPU1=y
CONFIG_TASK_WDT=y
CONFIG_TASK_WDT_PANIC=y
CONFIG_TASK_WDT_TIMEOUT_S=3
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
and I added one of my own tasks to the TWDT list and all worked as expected, if the Wi-Fi hung or my task hung the WDT would reset.
But now it just prints a panic message and doesn't reset. Why?
2.) With V3.1 I didn't get the IDLE task triggered messages so I'm assuming the IDLE tasks were resetting the WDT, is this the case?
3.) If I have to handle the WDT reset in the IDLE tasks now how do I hook into the CPU 0 IDLE task to reset the WDT, I currently have access to the CPU 1 IDLE task via vApplicationIdleHook()?
4.) How do I get the application to reset if there is a TWDT and not just print the panic message?
The CONFIG_ESP32_PANIC_PRINT_REBOOT=y is set to print and reboot.
Regards,
Charles
Watchdog changes from V3.1 to V4.1
-
- Posts: 19
- Joined: Fri Oct 06, 2017 10:27 am
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: MicroController and 35 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.