-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling Core0WDT in SPIFFS.format() might be the wrong WDT #11033
Comments
It is disabling the idle timer. While core1 is busy, it isn't feeding the idle timer on core 0, which causes the watchdog to fire. |
I am using the latest version of disableCore0WDT() with the boolean return value, and it is still giving me the error. Also I still do not understand how this can be correct if you are calling SPIFFS.format() from core 0. In the meantime I have learned why core0 idle warchdog might get triggered when formatting SPIFFS on core1, its because SPIFFS is a shared resource between the cores and prolonged acces could thus prevent core0 from firing idle task every now. (This is just to remind myself of this) |
The logic is: Core 1 WDT is OFF in Arduino, Core 0 WDT is ON. Disable Core 0 WDT while formatting to prevent WDT restarts. On single-core chips, WDT is disabled in Arduino, so the code should not do anything. We will look into the |
@me-no-dev Thanks for the explanation. I didn't know that Core 1 WDT was switched off in Arduino. |
@me-no-dev I think it is the loopWDT that generates these errors, but I can't really see how to disable it during the format. |
Board
ESP32 Dev Module
Device Description
Propriety board, based on ESP32 chip
Hardware Configuration
not relevant
Version
latest master (checkout manually)
IDE Name
VSCode with PlatformIO and pioArduino platform
Operating System
Windows 11
Flash frequency
40 Mhz
PSRAM enabled
no
Upload speed
460800
Description
In our factory-firmware version of the firware we call SPIFFS.format() in a pretty early stage of the setup(). This causes a very large number of
E (28769) task_wdt: esp_task_wdt_reset(705): task not found
errors to occur, before the setup continues as normal.This is caused by the
disableCore0WDT()
call in SPIFFS.format().Question 1: Why is this error occuring?
Question 2: Why is it necessary to disable the watchdog of the other cores idle task, as setup() is always running on core1?
Question 3: What if I have a task running on Core 0 that calls SPIFFS.format(), shouldnt that task disable the core1 Idle watchdog then?
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: