This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM368 usb 作为slave 连接PC



DM368作为usb 从端 , ID脚是确认上拉 的 , VBUS直接连接到5V,  然后通过usb线连接到电脑上,设备上加载如下驱动:

insmod g_file_storage.ko file=/dev/mmcblk0p1 stall=0 removable

此时在电脑上通过usbview能看到usb设备,如下:

Device Descriptor:
bcdUSB: 0x0200
bDeviceClass: 0x00
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x40 (64)
idVendor: 0x0525 (Netchip Technology Inc.)
idProduct: 0xA4A5
bcdDevice: 0x0316
iManufacturer: 0x01
iProduct: 0x02
iSerialNumber: 0x03
bNumConfigurations: 0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed: High
Device Address: 0x02
Open Pipes: 2

Endpoint Descriptor:
bEndpointAddress: 0x81 IN
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

Endpoint Descriptor:
bEndpointAddress: 0x01 OUT
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

但是电脑上看不到盘符,偶尔一次能看到,也是显示容量为0,无法格式化成功,设备上一直在打印如下信息:

usb connect
usb connect
g_file_storage gadget: highspeed config #1
usb connect
usb connect
g_file_storage gadget: high speed config #1
usb connect

分析代码应该是一直在复位usb,反复连接usb,

请问TI的工程师,上面的情况该怎么定位?谢谢了!

  • Timer,

    USB device的供电是usb host提供的,你直接就拉到5V,不是很好.

    请参考以下下面的论坛讨论内容:

    https://e2e.ti.com/support/dsp/davinci_digital_media_processors/int-dm3x/f/102/p/9006/36315#36315

    $ insmod g_file_storage.ko file=/path/to/storage/media stall=0

    here 'file' can be /dev/mmcblk01 to show SD/MMC as storage media.

  • Chris 谢谢你回复

    1. vbus跳线跳到vbus引脚后,还是上面的问题,看不到盘符,设备上一直在刷打印

     g_file_storage gadget: full speed config #1

    musb_g_ep0_irq 708: SETUP packet len 4 != 8 ?

     g_file_storage gadget: full speed config #1

     g_file_storage gadget: error in submission: ep0 --> -22

    g_file_storage gadget: full speed config #1

    g_file_storage gadget: full speed config #1

    g_file_storage gadget: full speed config #1

    g_file_storage gadget: full speed config #1

    g_file_storage gadget: full speed config #1

    g_file_storage gadget: full speed config #1

    有错误打印但看不出来是什么问题?

    2.  上面的网页打不开,我让同事访问也一样打不开,错误如下:

    Access Denied

    You do not have permission to view/download this item.

     

  • Timer,

    下面的信息你有参考过么?

    $ insmod g_file_storage.ko file=/path/to/storage/media stall=0

    here 'file' can be /dev/mmcblk01 to show SD/MMC as storage media.

  • 在设备上我执行的命令如下:

    insmod g_file_storage.ko file=/dev/mmcblk0p1 stall=0 removable

    盘符基本上在电脑上看不到,偶尔看到也是属性里容量为0,无法格式成功。

  • 你好,

    你试过insmod g_file_storage.ko file=/dev/mmcblk0p1 stall=0 removable=1么?

    Kernel配置再确认一下:https://e2e.ti.com/support/embedded/linux/f/354/p/132578/484648#484648。

    DM36x IPNC使用内存作为usb device的内存,insmod g_file_storage.ko file=/dev/sbulla stall=0 removable=1

  • Chris,

    我把usb 控制器的高速模式禁了,现在电脑上能看到设备,一切正常,速度只有1MB/s,full speed差不多就这个速度

    看起来是硬件问题,可硬件上就按照开发板画的,usb电路也就4个线,硬件也找不到问题,

    还有什么思路吗,要不要把电路图发出来

  • Timer,

    USB的布线要求,请参考High-Speed Interface Layout Guidelines

    http://www.ti.com/lit/an/spraar7f/spraar7f.pdf