chegewara / EspTinyUSB

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).
MIT License
473 stars 70 forks source link

usb msc host example error #147

Open f1andrew opened 10 months ago

f1andrew commented 10 months ago

Hello, I'm using esp32 arduino core v2.0.11 and ESP32S2 board. When I'm trying usb msc host example I'm getting next error:

18:53:52.766 -> entry 0x4004c18c
18:53:53.299 -> [   991][I][msc.ino:86] client_event_callback(): [] device speed: USB_SPEED_FULL, device address: 1, max ep_ctrl size: 64, config: 1
18:53:53.299 -> EP num: 1/2, len: 32, address: 0x81, EP max size: 64, dir: IN
18:53:53.299 -> EP num: 2/2, len: 32, address: 0x02, EP max size: 64, dir: OUT
18:53:53.299 -> capacity_cb: block_size: 512, block_count: 15155199
18:53:53.299 -> inquiry_cb
18:53:53.332 -> [  1021][E][msc.ino:216] write_test(): [] Failed to open file for writing
18:53:53.332 -> [  1026][E][msc.ino:145] read_test(): [TAG] Failed to open file
18:53:53.332 -> [  1031][E][msc.ino:183] read_test(): [TAG] Failed to stat dir : /msc
18:53:53.332 -> [  1036][I][msc.ino:289] setup(): [TEST] storage used: 4610618719054331904/4610618753414070272
chegewara commented 10 months ago

Somehow storage size is detected incorrectly. What is file system on USB device? Maybe its incorrectly formatted?

f1andrew commented 10 months ago

Thanks for response. USB drive is formatted as FAT32 in Windows. When plugged into PC it is correctly recognized as 8Gb flash drive.