WDT triggered after pause on AudioPlayer (ESP32, dual core, SD source) #2004
-
Hey folks, I'm working on an ESP32 project where I’m using an Everything works smoothly until I pause the playback. Then, exactly 2 seconds later, the Watchdog Timer (WDT) gets triggered and the ESP32 resets. I want to keep the WDT active, so I’m not looking to disable it — I’d rather find out what's stalling during the pause. Any idea what could be causing the task to stop feeding the watchdog after calling Thanks in advance! Note, here is my code in the task, if it can help. void AudioPlayerLoopTask(void *parameter)
{
bool *value = ((bool*)parameter);
while (*value)
{
audioManager.audioPlayer.copy();
esp_task_wdt_reset();
}
(*value) = true;
while (true)
{
// Wait until this task get deleted by the main thread.
esp_task_wdt_reset();
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think the easiest easyest implementation would be void AudioPlayerLoopTask(void *parameter)
{
while (true)
{
audioManager.audioPlayer.copy();
}
} This copies the data if it is active or just calls some small delay() if there is nothing to copy, to prevent exactly this issue! |
Beta Was this translation helpful? Give feedback.
I think the easiest easyest implementation would be
This copies the data if it is active or just calls some small delay() if there is nothing to copy, to prevent exactly this issue!