Description
When running the example code for the USB headset on my ESP32-S3 DevKitC board connected to the ES7210 and ES8311, I encountered an issue where the board was resetting due to a watchdog reset. To fix this, I added the line vTaskDelay((TickType_t)pdMS_TO_TICKS(1));
inside the infinite loop in the usb_task
function in the file usb_headset.c
, which resolved the watchdog reset issue.
static void usb_task(void *pvParam)
{
(void) pvParam;
do {
// TinyUSB device task
tud_task();
vTaskDelay((TickType_t)pdMS_TO_TICKS(1));
} while (true);
vTaskDelete(NULL);
}
However, when I play audio from my PC through the speaker connected to the ESP32, after a few seconds, the audio becomes noisy, kind of like a poor FM reception. After a few more seconds, it returns to normal, and this cycle repeats randomly.
Also, this issue only occurs when running the USB headset example. When running the MP3 example from esp-adf, the audio works correctly.
It appears that there is a problem with the USB audio handling How can I fix this issue? I would really appreciate any help.
Hardware and Configuration:
- ESP32-S3 DevKitC board with 8MB flash and 2MB PSRAM.
- ES7210 and ES8311 connected with the same pinouts.