You are here

Multiple USB UVC endpoints (multiple webcams) | Cypress Semiconductor

Multiple USB UVC endpoints (multiple webcams)

Summary: 1 Reply, Latest post by Madhu Sudhan on 29 May 2015 01:14 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
BenMorse's picture
1 post

I am trying to modify the See3CAM_CX3RDK_ e-CAM59CX3 example found here: and add another usb streaming endpoint.  The mipi device that I have attached to is actually sending frames from multiple different cameras.  These frames have a header in the first line of the frame which allows me to tell which camera they came from.


I have successfully modified the USB descriptor so that linux sees two separate UVC cameras (/dev/video0 and /dev/video1)  Originally the application uses this socket for video:

dmaCfg.consSckId[0]         = CY_U3P_UIB_SOCKET_CONS_3;

If I change this to CY_U3P_UIB_SOCKET_CONS_5 I am able to switch the video stream to /dev/video1.  I am not able to stream to both video enpoionts at once however.

Reading in cyu3dma.h I can see that there is no CyU3PDmaMultiType_t that is many to many which is what I think I want.  The existing application uses CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE.

Is it possible to have the DMA switch endpoints during it's callback?  I would like to change the consSckId on the fly so that I can stream frames to either video endpoint at will.

Does CyU3PUsbMapStream or CyU3PUsbChangeMapping help me accomplish this? I cannot find an example of either of these functions ANYWHERE on the web.  I've read the documentation but I don't understand exactly how I should use them.


Attached is the unmodified example project.  The only changes I've made are duplicating the bytes in the esUVCUSBSSConfigDscr struct.  The rest of the application and dma setup I haven't touched.


Thanks for any tips in advance.



mady's picture
Cypress Employee
964 posts

 Are you trying to do simultaneous transfer data from two cameras on two the endpoints simulanoeoulsy?

If so that is not possible? 

But you can receive data on both endpoints in a time division multiplexed manner. You can have a single DMA Socket  and the use CyU3PUsbMapStream to change the endpoint mapped with the socket.


-Madhu Sudhan

Log in to post new comments.