This example demonstrates how to use USB device interface and verify the driver of USB client. The MYD-AM335X series development board works as a TF card reader, it is connected to the USB host of PC with a USB mini B to USB A cable.
- Hardware debugging environment to see chapter2.
- One TF card
- One USB mini B to USB A cable.
|MINI USB interface||J2||J3||J3|
- Linux Kernel 4.1.18
- modprobe command
- After the MYD-AM335X series development is booted, connect it to the USB host interface of PC with a USB mini B to USB A cable, Insert the TF card to MYD-AM335X series development. Load the mass storage gadget driver as below:
# modprobe g_mass_storage stall=0 file=/dev/mmcblk0p1 removable=1
- After g_mass_storage driver is loaded, a removable disk will be detected on PC. The content of this removable disk is just the same with the TF card.
Note: Beyond that, users can load different gadget modules to achieve different functions. such as g_ether is used to make a RNDIS network interface.