-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
Hello,
Thank you for this useful library.
When using it on a "heavy loaded" ESP32-S3, I experienced watchdog timer (WDT) issues, suggesting a loop task was running for too long.
After some investigation, I found that delay(0) was not yielding, so I solved the issue by replacing
delay(0);
by
vTaskDelay(1);
in the following functions:
DFRobotDFPlayerMini::sendStack()
DFRobotDFPlayerMini::waitAvailable(unsigned long duration)
DFRobotDFPlayerMini::available()
I also came across situation where DFRobotDFPlayerMini::sendStack() whould be stuck in endless loop, so I replaced in
while (_isSending)
by
long timeout = millis() + 1000; // wait no more than 1000 ms
while (_isSending && millis() < timeout)
I found those changes to make the library more robust in my context.
HTH
Metadata
Metadata
Assignees
Labels
No labels