Skip to content
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

ESP32 Watchdog timer limited to approximately 1 hour, fix herein (IDFGH-4847) #6648

Closed
SWillSZ opened this issue Mar 1, 2021 · 1 comment
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@SWillSZ
Copy link

SWillSZ commented Mar 1, 2021

When attaching a watchdog time to a thread,

esp_task_wdt_init(TIMEOUT, true);
esp_task_wdt_add(NULL);

with timeout as a large value, the esp32 will panic before expected. The problem?
task_wdt.c
The line
wdt_hal_config_stage(&twdt_context, WDT_STAGE0, twdt_config->timeout * 1000000 / TWDT_TICKS_PER_US, WDT_STAGE_ACTION_INT);
should be replaced with
wdt_hal_config_stage(&twdt_context, WDT_STAGE0, twdt_config->timeout * (1000000 / TWDT_TICKS_PER_US), WDT_STAGE_ACTION_INT);
to avoid uint_32 overflow issues

@github-actions github-actions bot changed the title ESP32 Watchdog timer limited to approximately 1 hour, fix herein ESP32 Watchdog timer limited to approximately 1 hour, fix herein (IDFGH-4847) Mar 1, 2021
@Dazza0 Dazza0 self-assigned this Sep 23, 2021
@Dazza0
Copy link
Collaborator

Dazza0 commented Sep 29, 2021

@WilliamRoyle Thanks for the contribution. I'll push a fix to this shortly.

@espressif-bot espressif-bot added the Status: In Progress Work is in progress label Sep 29, 2021
@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: In Progress Work is in progress Resolution: NA Issue resolution is unavailable labels Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants