您的位置:首页 > 其它

Embeded USB Host controller之USB-IF测试

2014-09-13 18:23 1126 查看
对于USB-IF的测试主要分为electrical test和function test,主要需要关注http://www.usb.org/developers/compliance/highspeed/



一、full speed Electrical compliance test

二、high speed Electrical compliance test

需要治具HSEHET(High Speed Embeded Host Electrical Test)

测试的具体过程见http://www.usb.org/developers/hsehetboard/中的方框的标识,点开可看到里面的PDF,如下:



现在我简要概括如下:

1)测试的示意图:



2)测试过程
In a typical test, the HS-OPT will connect to the embeded host and present a specific VID/PID combination. Upondetecting the VID/PID combiniation
the embedded host enters a testmode. The termination switch on the HS Test Jig is then flipped andthe oscilloscope is used to make measurements on the embedded host.

不同的VID/PID组合对应不同的测试,如下:



三、Interoperability Test

互连性测试步骤见网站:http://linux-usb-test.sourceforge.net/docs/interop-0.2/book1.html



四、transfer Protocol tests

USB传输测试,需要用到特定的测试工具http://www.usb.org/developers/tools/

EZ-USB来测试full speed,net2280来测试high speed。

EZ-USB已经有了固件,直接拿来用,而net2280在windows或者ubuntu上需要安装driver来符合usbhost那边的测试。
1、Full Speed Compliance Device



2、High Speed Compliance Device



1)在windows上

Host端,安装USBHTT软件,USBHTT是针对windows上的host controller的测试,而且需要特定的测试设备。

http://www.usb.org/developers/tools/usb20_tools/#USBHTT

device端,需要net2280,他是PCI转usb device的板卡,驱动程序是在USBCV30安装目录下net2280.sys,安装好驱动程序之后便能作为USB设备来使用了。

2)在Linux上

Host端,因为Host是我们开发的嵌入式设备,在里面安装/drivers//usb/gadget/misc/usbtest.c驱动程序,然后执行/tool/usb/testusb.c中应用程序可以对net2280测试control、bulk、iso传输。

需要注意的是linux3.3内核中需要安装usbfs并执行命令mount -t usbfs none /proc/bus/usb后./testusb -a才得以执行。因为testusb应用程序需要到/proc/bus/usb目录下寻找usb设备,而在linux3.3以后的内核中usbfs被废弃,而是通过sysfs设备驱动体系结构在/dev/bus/usb/下长出usb设备,testusb到那边去寻找usb设备。

device端,我们将net2280插到PC上,PC的系统也是linux(我的是linux-3.3内核),给net2280安装驱动以便成为设备,如下操作:

进入/lib/modules/3.2.0-68-generic/kernel/drivers/usb/gadget目录

sudo insmod udc-core.ko

sudo insmod net2280.ko

sudo insmod g_zero.ko

如果你不确定g_zero模块又关联到哪些模块,你可以使用modprob g_zero.ko来安装g_zero模块。

将net2280插到host上,发现在host上长出了VID=0525,PID=a4a0的device

五、System function test

一般来说对于设备而言是必须要进行功能性测试,而对于主机,可能需要分别对插入他的存储设备、Video设备、HID设备来分别做功能性测试。

另外还需要测试host的connect/disconnect、suspend/resume、restart测试。见http://www.linux-usb.org/usbtest/最下方文字
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: