ESP32S2 - TinyUSB MSC Issue (from example)

texruska
Posts: 1
Joined: Fri May 19, 2023 3:41 pm

ESP32S2 - TinyUSB MSC Issue (from example)

Postby texruska » Fri May 19, 2023 3:48 pm

I'm using ESP-IDF v5 and I'm trying to reproduce the USB MSC example (https://github.com/espressif/esp-idf/tr ... e/tusb_msc)

I've managed to pinpoint my issue to this line (tusb_cfg is identical to the example code):

Code: Select all

tinyusb_driver_install(&tusb_cfg);
When I call it, my ESP32S2 reboots. Unfortunately I only have access to JTAG, which I can't use during this process to find a specific error message

By commenting out lines of code I find that this function is causing the problem:

Code: Select all

components/espressif_tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c:

// connect by enabling internal pull-up resistor on D+/D-
void dcd_connect(uint8_t rhport) {
    (void)rhport;
    USB0.dctl &= ~USB_SFTDISCON_M;
}
The trace looks like this:

Code: Select all

tinyusb_driver_install > tusb_init > tud_init > dcd_init
This is super bizarre behaviour, and I'm having trouble debugging the issue. Is it a sign of a hardware problem with my board, or am I misunderstanding how to use this example?

Who is online

Users browsing this forum: No registered users and 76 guests