i.MX53QSB - probllems with High-Bandw​idth USB isochronou​s transfers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX53QSB - probllems with High-Bandw​idth USB isochronou​s transfers.

924 Views
gonfer
Contributor V

Hi all,

a newbie here!

I'm trying to implement a USB gadget device with my i.MX53QSB using High-Bandwidth USB isochronous transfers (3 packets/microframe) but, unfortunatelly, with NO success. If I use 1 packet/microframe I have no problem at all, it works flawlesslly. The BSP is L2.6.35_11.01.00 from Freescale.

To change from 1 packet to 3 packets/microframe operation, as far as I know, I only need to change the .wMaxPacketSize field of the endpoint descriptor, so:
- for 1 packet/microframe:  .wMaxPacketSize = cpu_to_le16(0x0000+1024)
- for 3 packets/microframe:  .wMaxPacketSize = cpu_to_le16(0x1000+1024)

Doing this, if I plug the QSB to my host machine (Ubuntu 11.04), I can see the following (lsusb -v):
- for 1 packet/microframe:
      ..... . .
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
      ..... . .

- for 3 packet/microframe:
      ..... . .
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1
      ..... . .

so this looks OK.

The problem appears in "static int process_ep_req()" (in arcotg_udc.c), where "curr_td->size_ioc_sts" is always set to 0x8408 reporting a "DTD_STATUS_TRANSACTION_ERR" error. This only (and always) happens with 3 packets/microframe, no problem with 1 packet/microframe.

In /proc/driver/fsl_usb2_udc I'm not able to see any problem:

- for 1 packet/microframe:

root@freescale ~$ cat /proc/driver/fsl_usb2_udc
ARC USBOTG Device Controller driver
fsl-usb2-udc version: 1 August 2005
Gadget driver: g_webcam

USBCMD reg:
SetupTW: 0
Run/Stop: Run

USB Status Reg:
Dr Suspend: 0Reset Received: 0System Error: NormalUSB Error Interrupt: No err

USB Intrrupt Enable Reg:
Sleep Enable: 1SOF Received Enable: 0Reset Enable: 1
System Error Enable: 1Port Change Dectected Enable: 1
USB Error Intr Enable: 1USB Intr Enable: 1

USB Frame Index Reg:Frame Number is 0x1b89

USB Device Address Reg:Device Addr is 0x18000000

USB Endpoint List Address Reg:Device Addr is 0xcf3c6000

USB Port Status&Control Reg:
Port Transceiver Type : UTMIPort Speed: High Speed
PHY Low Power Suspend: Low power modePort Reset: Not in ResetPort Suspend Mode: Not in
Over-current Change: NoPort Enable/Disable Change: Not change
Port Enabled/Disabled: EnableCurrent Connect Status: Attached

USB Mode Reg:Controller Mode is : Device Controller

Endpoint Setup Status Reg:SETUP on ep 0x0

EP Ctrl Reg [0x0]: = [0x800080]
EP Ctrl Reg [0x1]: = [0x0]
EP Ctrl Reg [0x2]: = [0x840000]
EP Ctrl Reg [0x3]: = [0x0]
EP Ctrl Reg [0x4]: = [0x0]
EP Ctrl Reg [0x5]: = [0x0]
EP Ctrl Reg [0x6]: = [0x0]
EP Ctrl Reg [0x7]: = [0x0]
EP Prime Reg = [0x0]
For ep0 Maxpkt is 0x40 index is 0x0
req df582b40 actual 0x1a length 0x1a  buf df485500

For ep2in Maxpkt is 0x400 index is 0x2
req df3afe40 actual 0x400 length0x400  buf df53b400
req df3afde0 actual 0x400 length0x400  buf df53b800
req df3afb40 actual 0x400 length0x400  buf df53a000
req df3af540 actual 0x400 length0x400  buf df53b000

- for 3 packet/microframe:

root@freescale ~$ cat /proc/driver/fsl_usb2_udc
ARC USBOTG Device Controller driver
fsl-usb2-udc version: 1 August 2005
Gadget driver: g_webcam

USBCMD reg:
SetupTW: 0
Run/Stop: Run

USB Status Reg:
Dr Suspend: 0Reset Received: 0System Error: NormalUSB Error Interrupt: Err detected

USB Intrrupt Enable Reg:
Sleep Enable: 1SOF Received Enable: 0Reset Enable: 1
System Error Enable: 1Port Change Dectected Enable: 1
USB Error Intr Enable: 1USB Intr Enable: 1

USB Frame Index Reg:Frame Number is 0xb74

USB Device Address Reg:Device Addr is 0x1c000000

USB Endpoint List Address Reg:Device Addr is 0xcf391000

USB Port Status&Control Reg:
Port Transceiver Type : UTMIPort Speed: High Speed
PHY Low Power Suspend: Low power modePort Reset: Not in ResetPort Suspend Mode: Not in
Over-current Change: NoPort Enable/Disable Change: Not change
Port Enabled/Disabled: EnableCurrent Connect Status: Attached

USB Mode Reg:Controller Mode is : Device Controller

Endpoint Setup Status Reg:SETUP on ep 0x0

EP Ctrl Reg [0x0]: = [0x800080]
EP Ctrl Reg [0x1]: = [0x0]
EP Ctrl Reg [0x2]: = [0x840000]
EP Ctrl Reg [0x3]: = [0x0]
EP Ctrl Reg [0x4]: = [0x0]
EP Ctrl Reg [0x5]: = [0x0]
EP Ctrl Reg [0x6]: = [0x0]
EP Ctrl Reg [0x7]: = [0x0]
EP Prime Reg = [0x0]
For ep0 Maxpkt is 0x40 index is 0x0
req df584f60 actual 0x1a length 0x1a  buf df4826c0

For ep2in Maxpkt is 0x400 index is 0x2
req df3faf00 actual 0x400 length0x400  buf df58a000
req df3fac00 actual 0x400 length0x400  buf df58b000
req df3fab40 actual 0x400 length0x400  buf df58b400
req df3fae40 actual 0x400 length0x400  buf df58b800


"mult" (in arcotg_udc.c) is directly related to the number of packets/microframe, but for me it's use looks good.

The only problem I've found is in "fsl_ep_queue()" function; "udc" is declared and then used with no initialization. This issue is solved moving the line "udc = ep->udc;" to the beginning of the function. Unfortunately, this looks no to be related with the issue I'm experiencing.

I don't know how to continue. Please, any advice is welcome.

Gonzalo.

Tags (1)
0 Kudos
5 Replies

593 Views
gonfer
Contributor V

Joan Carles, I don't think so:

in 0x0c00    bits[12-11]= 01   so 1 aditional packet (total of 2 packets/uframe)

in 0x1400    bits[12-11]= 10   so 2 additional packets (total of 3 packets/uframe)

 

Dooty, I'll work on this after Easter. If documentation is accurate and there is no (undocumented) silicon bug, most of the work is done. Anyway, I'm using a mainline kernel, and things are a bit different than in FSL BSP. If needed, I expect to find support in the USB mailing list.

 

Regards,

Gonzalo.

0 Kudos

593 Views
Embedding
Contributor II

Hi Gonzalo,

Thank you  for your reply. Without freescale support, have you tried to implement high bandwidth isochronous support in UVC gadget driver. What is the current status?. Is it possible to develop UVC gadget driver for high bandwidth Isochoronus support without help of freescale.

Regards,

Dooty.

0 Kudos

593 Views
gonfer
Contributor V

I'm sorry to say I didn't find a solution. The answer from Freescale to my Technical Service Request was that this feature was not supported.

On the other hand, I also need a solution for this problem, but on a iMX25. I've just started to investigate this issue on a 3.2.2 kernel but I have some preliminary problems (the USB engine is constantly reseting when plugged to a PC and still don't know if this is a harware/software problem). As I'm currently busy in another project, I'll come back to this issue after Easter, and will report my findings here.

Regards,

Gonzalo

0 Kudos

593 Views
Embedding
Contributor II

Please any of one can update we are facing the same issue.

0 Kudos

593 Views
cader
Contributor II

We also facing the same issue. please update the current status of this issue. Whether it is solved or not ?.

0 Kudos