PaulStoffregen / USBHost_t36

USB Host Library for Teensy 3.6 and 4.0
165 stars 85 forks source link

Updates to improve connectivity to USB mass storage devices #62

Closed wwatson4506 closed 1 year ago

wwatson4506 commented 3 years ago

There have been several issues with connecting to USB thumb drives and recently USB SD card readers. Some of these devices which appear to be older are taking longer to be ready for use by MSC. I ran into the same problem when testing with A USB SD card reader on some of my older SD cards and thumb drives. The error codes were indicating timeout errors. To correct this I have increased the timeout times in msc.h to 5 seconds instead of 1 and 4 seconds for both MEDIA_READY_TIMEOUT and MSC_CONNECT_TIMEOUT. The other change is to MassStorageDriver.cpp where msDriveInfo was not being initialized before being used in the claim function. This was causing false info about the USB drive being claimed.