Project

General

Profile

Example Using USB Type A Host Ports

Objective

The goal of this wiki page is to verify that the two USB Type-A ports, connected to a USB 2.0 HUB controller, on the Devkit are working.

Prerequisites

  • This test verifies the ports by using a USB-stick.

Steps

  • List the usb devices when nothing is plugged in.
    root@mitysom-am62x:~# lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 0451:8027 Texas Instruments, Inc.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    root@mitysom-am62x:~#
    
  • Plug a USB-stick into one of the 2 USB-2.0 Type-A
    ports. Use lsusb to verify that an additional device is now present.
    root@mitysom-am62x:~# lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 004: ID 0781:5567 SanDisk Corp. Cruzer Blade
    Bus 001 Device 002: ID 0451:8027 Texas Instruments, Inc.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    root@mitysom-am62x:~#
    
  • The linux kernel will automount USB Sticks when they are plugged in as a "SCSI" device (/dev/sda) To locate the mount point, run the following:
    root@mitysom-am62x:~# lsblk
    NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda            8:0    1   7.3G  0 disk /run/media/sda
    mtdblock0     31:0    0   512K  0 disk
    mtdblock1     31:1    0     2M  0 disk
    mtdblock2     31:2    0     4M  0 disk
    mtdblock3     31:3    0   256K  0 disk
    mtdblock4     31:4    0   256K  0 disk
    mtdblock5     31:5    0 247.8M  0 disk
    mtdblock6     31:6    0   256K  0 disk
    mmcblk0      179:0    0  59.3G  0 disk
    `-mmcblk0p1  179:1    0  59.3G  0 part /run/media/mmcblk0p1
    mmcblk0boot0 179:32   0  31.5M  1 disk
    mmcblk0boot1 179:64   0  31.5M  1 disk
    mmcblk1      179:96   0  14.9G  0 disk
    |-mmcblk1p1  179:97   0 132.6M  0 part /media/mmcblk1p1
    `-mmcblk1p2  179:98   0   3.3G  0 part /
    root@mitysom-am62x:~# ls /run/media/sda
    lost+found  randFileUSB10k  random_usb1.bin
    root@mitysom-am62x:~# 
    
  • Before removing the USB stick you should do the following:
    eject /dev/sda
    
  • After doing the eject, you can remove the USB stick and insert it into another port.
    • The lsusb may list the USB stick with a different Device
    • The file system will likely be mounted on the same /dev/sda and be available at /run/media/sda
    • Again, do an eject /dev/sda before removing the USB stick.
  • Note: if the USB stick includes a partition table, you may see the filesystem mounted as /run/media/sda1, such as the following:
    root@mitysom-am62x:~# lsblk
    NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda            8:0    1  14.7G  1 disk
    `-sda1         8:1    1  14.7G  1 part /run/media/sda1
    mtdblock0     31:0    0   512K  0 disk
    mtdblock1     31:1    0     2M  0 disk
    mtdblock2     31:2    0     4M  0 disk
    mtdblock3     31:3    0   256K  0 disk
    mtdblock4     31:4    0   256K  0 disk
    mtdblock5     31:5    0 247.8M  0 disk
    mtdblock6     31:6    0   256K  0 disk
    mmcblk0      179:0    0  59.3G  0 disk
    `-mmcblk0p1  179:1    0  59.3G  0 part /run/media/mmcblk0p1
    mmcblk0boot0 179:32   0  31.5M  1 disk
    mmcblk0boot1 179:64   0  31.5M  1 disk
    mmcblk1      179:96   0  14.9G  0 disk
    |-mmcblk1p1  179:97   0 132.6M  0 part /media/mmcblk1p1
    `-mmcblk1p2  179:98   0   3.3G  0 part /
    root@mitysom-am62x:~#
    
  • You can try each port to verify that the USB stick is usable regardless of which port is used.

Conclusion

The steps needed to verify the USB-2.0 Type-A Hub ports are shown.

Go to top
Add picture from clipboard (Maximum size: 1 GB)