Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - usbd_urb_status() returning undefined status code: (4 Items)
   
usbd_urb_status() returning undefined status code  
I have a usb bulk transfer that is failing.

When I use usbd_urb_status( urb, &status, &alen ) to find out why, it returns EIO and sets status to 0x02000010.

The USBD_URB_STATUS_MASK portion of this status (i.e. 0x02000000) tells me that the operation is complete but encountered an error.

The USBD_USB_STATUS_MASK portion of this status (i.e. 0x00000010) however is not defined in <usbdi.h> so I have no idea what the actual error is.

Can anyone tell me what this status means?

Thanks,
Dan
Re: usbd_urb_status() returning undefined status code  
Maybe your usbdi.h is out of date somehow? With a standard 6.4.0 install I have these defines in mine:
#define USBD_STATUS_NO_MEM_FOR_TRANSFER 0x00000010
#define USBD_STATUS_ISOCH_MISSED_PERIOD 0x00000020

Regards,
Gilles
Re: usbd_urb_status() returning undefined status code  
Gilles:

Im getting the same error. My system is 6.4.0 and my header files are correct. 
The code does a number of smaller, less than the 64 bytes, writes and works. However whan I try to do a write of 63.4K .
 It fails. with an 0x2000010.  A Complete with error and NO_MEM_FOR_TRANSFER. 

I used usbd_alloc to create the block of data to be written. 
The usbd_io call returned EOK, and the bulk output callback is called. In  the callback, usbd_urb_status gives the 
0x2000010 status and zero bytes as the length. 

What does the error mean? Where is there not enough memory? and most importantly, how can it be overcome. 

Thanks,
Andy
Re: usbd_urb_status() returning undefined status code  
what usb driver are you running on? ehci? The error probably tells you that you are running out of transfer descriptors.
 Fro examples, on ehci, you can try specify a num_td=xxx some larger numbers, the default is 256, etc.