EspTinyUSB icon indicating copy to clipboard operation
EspTinyUSB copied to clipboard

ESP32-S2 USB SD MSC not working well

Open BenjamimKrug opened this issue 2 years ago • 3 comments

Hi, @chegewara, I'm trying to use an ESP32S2 USB stick(https://www.hackster.io/news/create-custom-usb-devices-with-the-esp32s2stick-458bf370a522) to make an SD to USB adapter, however it seems to be taking too long to read the whole 8GB SD card for the USB, when I enable verbose core debug level, it just shows "[V][sdcard.cpp:65] onRead(): default onread". I saw on this post: https://www.esp32.com/viewtopic.php?t=15908 that you used a 16GB SD card and got it working. The comunication with the SD card is working, because the test code created the directory /mydir, wrote and read the hello.txt file, so to me it seems like something on the USB side.

My code is this: USB_stick.zip

Obs.: I tried putting the code in the post, but I couldn't get right, this is my first post on github.

I'm using ESP32 2.0.1 RC1 and windows 10.

Edit: I tested it on linux and it worked, but on any windows machine it seems to not work.

BenjamimKrug avatar Dec 15 '21 13:12 BenjamimKrug

Hi, i dont know what is going on on windows, because i tested it only linux, but you cant expect it to be very fast, especially when you turn on verbose logs. This is only full speed USB, 12 mbit, and even this speed is not used, and logs will slow it down 4 times or even more.

chegewara avatar Dec 15 '21 15:12 chegewara

I also tested It without logs, and it's still too slow. I gonna test it on some other other OS' and try to see what might be causing the problem on windows 10.

BenjamimKrug avatar Dec 15 '21 15:12 BenjamimKrug

For testing you can also try examples from adafruit. Ive read that adafruit library is working now.

chegewara avatar Dec 15 '21 15:12 chegewara