Thumb Drive with SAMA5D2 Xplained Ultra

Moderator: nferre

3F800000
Posts: 18
Joined: Wed Apr 25, 2018 6:36 pm

Thumb Drive with SAMA5D2 Xplained Ultra

Tue Jan 21, 2020 2:05 am

How would I use a thumb drive with my SAMA5D2 Xplained Ultra Evaluation board, specifically with J13.

The user guide describes J13: "USB Host B. Supports USB host using a type A connector". J13 is connected to the UHPHS (B) high speed host on the SAMA5D2.

I don't see an example in the softpack for this. To be clear, I want to be able to manipulate a file system on the thumb drive inserted into J13; e.g. list directories and files, and create/modify directories and files. I've used FatFS with SD cards but that involves the SDMMC0/1 peripherals which don't apply in this case. Note there is no host PC involved, just my Xplained board manipulating the thumb drive through J13.

Any guidance is appreciated.

Thanks.
blue_z
Location: USA
Posts: 2076
Joined: Thu Apr 19, 2007 10:15 pm

Re: Thumb Drive with SAMA5D2 Xplained Ultra

Tue Jan 21, 2020 3:14 am

By "thumb drive" you presumably are referring to a flash drive with a USB interface.
USB is not a simple device interface but a bus, like PCI/PCIe and ISA. The "B" in USB stands for "Bus".
Note that "thumb drive" is not a generic term, and ThumbDrive™ is a trademark.

The software to access a device connected on a bus like USB is significant.
I have no idea what "standalone" software is available (other than U-Boot), but you would typically need:
  • a USB host protocol stack,
  • a device driver for the USB host controller (Microchip/Atmel seems to have published only Linux and U-Boot versions for UHPHS; the Softpack only has drivers for the USB device controller),
  • USB device drivers for any/all flash drives (and adapters) that you expect to use,
  • filesystem handlers for any/all that you expect to use.
Perhaps you should boot a Linux4SAM demo image from SD card to prove to yourself that the SBC (as is) is capable of "list[ing] directories and files, and create/modify directories and files" on an attached USB flash drive.
Linux may not automount the inserted USB flash drive for you, so you'll have to know how to use the mount command (e.g. `mount -t vfat /dev/sda1 /mnt`).
But you will be able to demonstrate to yourself that what you want to accomplish is not a hardware issue, and is purely a software issue.

Regards
3F800000
Posts: 18
Joined: Wed Apr 25, 2018 6:36 pm

Re: Thumb Drive with SAMA5D2 Xplained Ultra

Tue Jan 21, 2020 7:15 pm

Good advice, thank you.

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 5 guests