First read the Tasks basic on this page, to understand the basic tasks based approach of the ESP-IDF / FreeRTOS.

IDLE Watchdog

The ESP-IDF created task for each CPU core (called “IDLE0”, and “IDLE 1” if there is a second core) are idle tasks that reset watchdog timeout whenever that respective core is idling. This means by design, esp-idf requires and forces that each core never be fully busy for too long. If this happens (such as an infinite loop that doesn’t call a long enough vTaskDelay or its equivalent anywhere), it will result in the watchdog being triggered.

If you don’t want to delay your applications main loop for 10mS periodically

Options to deal with IDLE# task watchdog

  • Don’t allow any task to fully consume a core, so that it idles frequently enough for the watchdog to stay happy.
  • Bear in mind you only need to let the IDLE task run before the watchdog time period runs out, you don’t have to call vTaskDelay() every iteration of your main loop.
  • Disable the watchdog
  • Set the tick rate to, say, 1000Hz. FreeRTOS will spend more time in context switch interrupts, so you have a few less CPU cycles available for your program, but you’d be able to delay a task for >= 1ms.

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *