- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I wanna make data flow like below.
===============================
FPGA--------------> FX3 ------------> USB
Slave FIFO UVC
===============================
- 32-bit Slave FIFO interface
- 3264*2448 pixel resolution
- 16 frames per second
reference urls: FX3-UVC: 1080P@60 fps,YUY2
- I refered "Memo_UVC_with_SlaveFifo_Interface" that I include files
reference documents : AN75779 , AN65974
I understand I need to notify the FX3 when a frame starts and ends in order to generate the UVC header.
please let me know how to make the header structure.
Thanks you very much.
Best Regard
TaeYoung Lee
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I understand that you are trying to implement UVC while the header addition is not done by FPGA and you intend to do it using FX3.
In the firmware which you are using, the UVC headers should be added by the FPGA before transmitting through the slave FIFO interface to the host. Here FX3 is using an Auto DMA channel and hence DMA buffers cannot be modified by CPU.
If you need the FX3 firmware to add the UVC headers, then you will need to use the MANUAL channel for the same - for every buffer sent to the host, the UVC header should be added not just for the frame start and end. Frame end can be detected in the firmware when a DMA call back reports a partial buffer (buffer size should be configured such that for ever resolution you stream the last DMA buffer of a frame is a partial buffer).
CY_U3P_DMA_CB_PROD_EVENT should be monitored in the DMA call back function and when the PROD event occurs, the UVC headers should be added to every producer buffer depending on the buffer size i.e. if its a full buffer or a partial buffer, and then commit the buffer to the consumer i.e. the U-PORT using the CyU3PDmaChannelCommitBuffer() function.
For your reference, I have attached a firmware project which implements UVC with Slave FIFO interface. Please note that the State machine is same as that in AN65974.
You can refer to the CyFxUvcApplnDmaCallback() function in the firmware project for adding the UVC headers for each producer buffer.
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I understand that you are trying to implement UVC while the header addition is not done by FPGA and you intend to do it using FX3.
In the firmware which you are using, the UVC headers should be added by the FPGA before transmitting through the slave FIFO interface to the host. Here FX3 is using an Auto DMA channel and hence DMA buffers cannot be modified by CPU.
If you need the FX3 firmware to add the UVC headers, then you will need to use the MANUAL channel for the same - for every buffer sent to the host, the UVC header should be added not just for the frame start and end. Frame end can be detected in the firmware when a DMA call back reports a partial buffer (buffer size should be configured such that for ever resolution you stream the last DMA buffer of a frame is a partial buffer).
CY_U3P_DMA_CB_PROD_EVENT should be monitored in the DMA call back function and when the PROD event occurs, the UVC headers should be added to every producer buffer depending on the buffer size i.e. if its a full buffer or a partial buffer, and then commit the buffer to the consumer i.e. the U-PORT using the CyU3PDmaChannelCommitBuffer() function.
For your reference, I have attached a firmware project which implements UVC with Slave FIFO interface. Please note that the State machine is same as that in AN65974.
You can refer to the CyFxUvcApplnDmaCallback() function in the firmware project for adding the UVC headers for each producer buffer.
Thanks,
Yatheesh