USB superspeed peripherals Forum Discussions
Hi all,
I am using the cx3 to capture images with an imx219 camera module connected to the MIPI port. The cx3 is connected to the host pc via high-speed usb.
The problem I am facing is, that I only receive about 1/5 of the data I should get (independent from the amount of data - its 1/5 for a 3280x2464 image as well as for a 256x256 image). I do not get any errors from the mipi block during transmission. The received data seems, like some junks are missing here and there.
Here is the MIPI Block configuration:
CyU3PMipicsiCfg_t mipiConfig_imx219_RAW10_104MHz =
{
CY_U3P_MIPIOUT_DW_16, /* MIPI out parallel width packing --> here set to YUV422*/
2, /* Number of CSI data lanes. */
2, /* PLL clock input divider. */
129, /* PLL clock feedback divider. */
CY_U3P_CSI_PLL_FRS_63_125M,/* PLL clock range. */
CY_U3P_CSI_PLL_CLK_DIV_4, /* Divider for clock used to detect CSI LP<->HS transition. */
CY_U3P_CSI_PLL_CLK_DIV_4, /* Divider for clock used on the parallel GPIF interface. */
0x00, /* Reserved */
0x00, /* Reserved */
0x00, /* Reserved --> this line is the given value by the suite*/
100 /* Delay on the parallel output buffer of CSI interface. */
};
The camera module's clock is set to 104MHz (exactly as the MIPI block).
I load the GPIF using:
CyU3PMipicsiGpifLoad(CY_U3P_MIPICSI_BUS_16, 0x600); // where 0x600 is also the size of a DMA buffer
The DMA is in AUTO_MANY_TO_ONE (so no callback) mode with 2 Sockets on the GPIF side and one socket to the USB side.
I am using 4 buffers with a size of 0x600 and CY_U3P_DMA_MODE_BYTE.
The Endpoint is of type Bulk and the packet size set to 512.
After a lot of tests, I think the problem could be realted to the GPIF configuration, but I am not sure.
I read the data with libusb_bulk_read and also tried all kind of buffer sizes on the host pc's side.
I would be very grateful for any hints.
Show LessHello,
I am looking for the Firmware project (Eclipse Project) for the OV7251 Image Sensor. Even a simple implementation that offers the following functionalities will be sufficient:
- UVC-compliant output
- 640x480 pixel resolution
- Raw video
Does anyone have a project that can be shared?
Thanks in advance,
Mo
Show Less你好,我想询问一下UART使用DMA时收取数据的代码。之前我是用的是非DMA模式,使用的函数是CyU3PUartReceiveBytes,但是其处理速度不符合我的要求。因此我使用DMA模式进行收取,这时候我收取的数据应该使用什么函数,或者说我应该如何才能拿到UART通过DMA收取回来的数据呢?
Show LessI am working on an application which sends UVC data over the GPIF data bus but there isn't a guarantee that the final write of my data packet will consume the full 32bit of the data bus. What would be the best way to mask the bits I am not using and account for this situation? Can I dynamically mask out bits in GPIF or in the FX3 firmware? If not, how should I deal with this situation. The data is in multiples of 8bits and we are not yet sure if the final packet will always be 8bits, 16bits, 24bits or 32bits so a dynamic solution which can account for these different amounts of final data would be best.
Thanks
Show LessDear Support Members
I defined mutichannel dma for stream as below (DMA Size is 16KB...as i think...)
======
#define STREAM_DMA_BUFFERS 6
#define STREAM_DATA_BUF_SIZE 0x3FF0
#define STREAM_PACKET_HEADER_SIZE 16
#define STREAM_PACKET_FOOTER_SIZE 0
The calculation of the number of dma buffers is increased when a produce call back occurs in the callback function, and decreased when a consume call back occurs.
Why can't I use all 12 buffers?
Based on the previous questions, I think you should be able to use all 12.
How do I set the dwClockFrequency value in the UVC probe structure? I have clockConfig.setSysClk400 = CyTrue in my CyU3PSysClockConfig_t configuration so do I simply use 403200000 for this value?
Related, once I get my dwClockFrequency value, I can then use CyU3PGetTime() to retrieve a value for PTS and insert it into my UVC headers. Is this correct? Show LessAs mentioned in the title, I use Control Center on PC to recongnize CYUSB3014-BZXI device on PCBA and that's OK.
Here Control Center is in Cypress's suite for FX3 devices.
However, when I power off my PCBA and PC, or just power off PCBA, Control Center occasionally shows no device after power on. On this circumstance, I could only unplug the USB3.0 wire and plug it again, and it's OK again.
Add: PC's OS is win10.
It's not OK as follow.
Next it's OK after re-plug.
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/%E8%B6%85%E9%AB%98%E9%80%9FUSB%E5%A4%96%E8%AE%BE/Control-Center-cannot-reconize-CYUSB3014-after-power-on-unless-re-plug-USB-wire/td-p/740415
Show LessHello,
I use Cypress FX3 with my Zynq 7020 SoC. I stream 1920x1080 30FPS YUV 4:2:2 video via USB3.0. I face some issue, after some time(not a certain time), I saw image is mirroring and some lines on the video. Its not always happens but sometimes.
I have attached a footage here.
What should be the reason? Why it can be happens, any idea?
Thanks.
Show LessI am modifying my UVC descriptors to enable MJPEG streaming in addition to uncompressed but am encountering an error where the device cannot enumerate. Using USB Tree View, I cannot see the specific error being encountered, only that it is not enumerating. This started occuring once I started modifying the wTotalLength field of my Class-specific VS Interface Input Header Descriptor so I think my calculation for this value is correct. My current way to calculate that value is the following:
...
VC-Specific VS Video Input Header Descriptor (size=0x0F)
0x01 larger than with 1 format b/c 1 extra format
VS Uncompressed Format Type Descriptor (size=0x1B)
VS Uncompressed Frame Type Descriptor (size=0x1E)
VS Color Matching Descriptor Descriptor (size=0x06)
Video Streaming MJPEG Format Type Descriptor (size=0x0B)
Video Streaming MJPEG Frame Type Descriptor (size=0x1E)
VS Color Matching Descriptor Descriptor (size=0x06)
...
So I am calculating that the wTotalLength field should be 7D. Is this correct? I am not sure if the Color Matching descriptors should be included in wTotalLength field.
Thanks
Show LessHello, I am trying to get the CX3 working with a Time of Flight sensor. I believe I have everything configured properly but I am not seeing any DMA buffer call backs, or any kind of producer events triggering. I have summarized some high level information below:
- FX SDK Version: 1.3.5
- FW: Autogenerated FW from EZ USB Suite, configured for streaming on BULK endpoint, no UVC.
- MIPI Clock type: Gated
- MIPI Configuration:
- H blanking and V blanking are not filled in here as they do not affect the mipi configuration output. I measured the H blank time and the V blank time directly with a scope:
- Hblanking: 230 uS
- Vblanking: 9.29 mS
- My THS prepare and THS-zero times were measured directly using a scope so I am pretty confident in the value I have for PHY Time Delay.
- MIPI clock frequency from the imager confirmed directly with a scope.
Imager output:
My imager outputs its data one line at a time. Each line is comprised of 3 long packets filled with metadata (data type = 0x31) followed by 24 long packets of pixel data (RAW12), each long packet contains 8 pixels worth of data. An example is shown below:
There are 56 packet sets (3 metadata + 24 RAW12) per frame. As shown below:
Test process:
- Flash the CX3 RAM with my FW.
- Initialize MIPI block and apply interface settings with CyU3PMipicsiSetIntfParams
- Set PHY Time Delay with CyU3PMipicsiSetPhyTimeDelay and configure GPIF bus width:
- Call CyCx3AppStart(), configure imager, and then start MIPI stream.
UART log from startup using FW generated by EZ USB suite with small additions of some print statements:
UART log after starting MIPI stream with a print statement added to my thread entry for MIPI errors (code added for printing MIPI errors shown below):
As you can see, I am getting a bunch of Multi data lane sync errors and an occasional FrmErr.
I have tried tuning my PHY delay time and I can’t really make things better than this. I can produce more errors when I set PHY delay time below 6 or so. But I never get less errors than what is shown above. I also never see a DMA call back or any producer events.
I have confirmed that the layout of my board is up to MIPI specifications in terms of inter lane length differences, total trace length, and differential pair impedance. I am at a loss for what the issue could be here…
Any assistance on this issue would be greatly appreciated. I have attached my full project for your review. Please note that all imager configuration code is handled outside of the CX3 so you will not see any code for that in the CX3 FW.
Show Less