-
Notifications
You must be signed in to change notification settings - Fork 11
Portenta Machine Control USB drive - Error mounting USB device -22 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The Portenta Machine Control along with the Arduino giga has issues reading some types of USB sticks because there are fakes that are circulating around that have communication issues with these boards. I would first try formatting the flash drive as a smaller capacity(16mb should be a good start) with FAT file system instead of FAT32. If this still doesn't work,. then your best bet would probably be to buy a different brand USB flash drive. |
Is your USB stick named -mbed::FATFileSystem usb("usb");
+mbed::FATFileSystem usb("myUsbStickName"); |
@Zawi-Dzenklo Following tests without code changes from above Kingston 8GB DataTraveler G3
Repeat but now create the partition of 256MB
Kingston 8GB 100 G2
TwinMos USB2.0 Mobile Disk X4
Updated the name -mbed::FATFileSystem usb("usb");
+mbed::FATFileSystem usb("TEST");
Tested
|
The -22 error usually means that the FAT file system on the drive isn't correctly set up (already from the formatting, or from corruption somehow). Since you only get these errors with the Kingston 8GB DataTraveler G3, I would first suspect that particular thumb drive. I assume your drives were formatted on the same computer with the same operating system and settings. If not, it would be interesting to know the differences. As for the name passed to mbed::FATFileSystem usb(), it doesn't have to match the name of the volume. It's used to signal where you want the drive mounted. If you pass "usb" it will be mounted at "/usb/" and a file in the root directory will be "/usb/file.txt". If you pass "mythumbdrive" the file will be at "/mythumbdrive/file.txt" instead, and so on. |
Hello, I am trying to store and read files from a USB drive. I tested the example
DirList.ino
and uncomment the linembed::DigitalOut otg(PB_14, 0);
as specified.Here is my full code that I tested on Portenta Machine Control (PMC) with USB drive connected to it (just a regular USB stick, formatted to FAT32)
However there is an error in the Serial Monitor. Any ideas?
The text was updated successfully, but these errors were encountered: