Hi, I am working with TMS320C5535 eZdsp USB Kit, I tried debugging Connected Audio framework example successfully. But now I am adapting it as a webcam device conforming to USB Video Class (UVC) specs, everything is good so far, the board is recognized as USB Video Device except that when I connect to the board to start streaming function (the host UVC driver on Windows will send packet to set the interface to alternative interface number 1), the host keeps saying that "Cannot connect device. The device may already be in use" - certainly there is none using this device.
I tried to debug and use USB Monitor to track the packets going from/to the USB port, what I have found so far is weird:
- By the time I connect to the device, inside function MUSB_Handle_EP0_Intr (app_usb.c), case CSL_USB_SET_INTERFACE: when it runs through this line
usbRegisters->PERI_CSR0_INDX |= CSL_USB_PERI_CSR0_INDX_SERV_RXPKTRDY_MASK, USB Monitor shows that the host return error USBD_STATUS_BUFFER_UNDERRUN (0xc000000d). I got no clue how this might happen and how to fix it. I guess this is the reason I cannot connect to the board as a Webcam device.
- Also, before that instrument, usbRegisters->PERI_CSR0_INDX = 0x0001, after bit OR with CSL_USB_PERI_CSR0_INDX_SERV_RXPKTRDY_MASK (0x0040u), it becomes 0x0011. How this could happen?
- The Status returned in Hdr is USB_STATUS_INVALID_PARAMETER (0x80000300), and the field InterfaceHandle in URB_FUNCTION_SELECT_INTERFACE request = 0xffffffffffffffff, while it should be something else like 0xffffffffc9262d00...
I got stuck at this point for several days without any progress, so I appreciate any help or suggestion for this. Thank you very much.