Please find the project attached. UVC along with UART communication has been implemented. Please note that in this project, only after the video has started playing (i.e STREAM_EVENT is received from the host), the UART Communication will be active.
The firmware comes up as two devices in your device manager (i) a UVC Camera (ii) COM Port. In addition to these, you will notice a common "USB Composite Device" under the list of USB Controllers in your device manager.
For the COM Port interface, you can get the driver from here:
Memo_UVC_ComPort_0.zip 2.3 MB
Thanks for the reply!
I tried your fireware but it didn't come up as either a UVC Camera or a COM port and the drivers you linked doesn't seem to help(probably doing something wrong on my side),
We found another project where we got a FX3 image device and a COM port but the problem with that is that the UART only loopback from the processor and doesn't sent or receive anything from the external UART pins on the FX3 superspeed explorer kit.
So now i wonder if you know where i can modify so that it send the UART communication thru the external pins instead.
maybe doing something with this?:
CY_U3P_LPP_SOCKET_UART_CONS, /**< Outgoing data to UART peer. */
I've attached two files:
uvc + uart_proj is the original files
USBVideoClass, is a modified version where we still get a loopback but also managed to transmit but not receive the UART.
Thankful for any help!
I saw now that the second file i attached isnt working now, If you change to following you should be able to find the devices.
/* Create a DMA_AUTO channel between usb producer socket and uart consumer socket */
dmaCfg.size = size;
dmaCfg.count = 8;
dmaCfg.prodSckId = CY_FX_EP_PRODUCER1_SOCKET;
dmaCfg.consSckId = CY_U3P_LPP_SOCKET_UART_CONS; --> change to CY_FX_EP_CONSUMER1_SOCKET
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg.notification = 0;
dmaCfg.cb = NULL;
dmaCfg.prodHeader = 0;
dmaCfg.prodFooter = 0;
dmaCfg.consHeader = 0;
dmaCfg.prodAvailCount = 0;
/* Create a DMA_MANUAL channel between uart producer socket and usb consumer socket */
/* Use a smaller buffer size (32 bytes) to ensure that packets get filled in a short time. */
dmaCfg.size = size;
dmaCfg.prodSckId = CY_U3P_LPP_SOCKET_UART_PROD;
dmaCfg.consSckId = CY_FX_EP_CONSUMER2_SOCKET;
dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT; --> Change to CY_FX_EP_PRODUCER2_SOCKET
dmaCfg.cb = CyFxUSBUARTDmaCallback;
// dmaCfg.notification = 0;//CY_U3P_DMA_CB_PROD_EVENT;
// dmaCfg.cb = NULL;//CyFxUSBUARTDmaCallback;
try close debug uart port