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 Preparation:
- Hardware debugging environment to see chapter2.
- One TF card
- One USB mini B to USB A cable.
Board Type | MYD-AM335X | MYD-AM335X-Y | MYD-AM335X-J |
---|---|---|---|
MINI USB interface | J2 | J3 | J3 |
TF Card | J17 | J12 | J19 |
Software Preparation:
- Linux Kernel 4.1.18
- modprobe command
Test Steps:
- 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:
1 |
# 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.
近期评论