USB superspeed peripherals Forum Discussions
Hi,
I'm working with the FX3 DVK, following the application notes AN65974 to perform stream_in, stream_out and loopback transfer with my Xilinx FPGA. When performing stream_in and stream_out transfer, it seems quite ok.
However, during loopback transfer, after transfer data out, when I was trying to read data back from bulk in endpoint, it shows that zero length data transfered. I think the communication betwwen FX3 and FPGA failed. So I tried to capture how each control signal data react from FPGA side during transfer. I found that my flagd is always 1 and never changed to 0 and my flagc once changed from 0 to 1, never changed back to 0. As a result, SLRD# keeps asserted during the whole process. Btw, I used the firmware code provided by Cypress and the flag configuration is just same.
How can I solve this problem?
Regards,
Zoe
Show LessHello,
Well In my project I am interfacing USB FX3 board with MAX2769 , which has 3 SPI lines. So, I am changing Sw as using MISO pin to use bi-directional or interfaceing MISO and MOSI pins with 10k register to signal DATA line on chip. Can you advise me.
Prashant
Show LessHello. I'm using Cypress EZ-USB FX3. The following is my problem.
An FPGA is sending data ranging from 1 to 255 to FX3. The GpifToUsb firmware (located in Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxgpiftousb) is adjusted, where the data bus is 8 bits and the clock is 12MHz. I add a line in the Streamer C# program to write the data sent from FX3 to PC into a txt file so that I can check whether the data received is right.
The data is right in the most time, but sometimes I can find data missing. For example, this byte is 120, the next byte is 147, not 121.
I store the positions where the data misses and find the periodity. If X stands for the CY_FX_DMA_BUF_SIZE in the GpifToUsb project, then the two continuous positions' difference is X. For example, if CY_FX_DMA_BUF_SIZE is 8192, the positions can be 1, 8193, 16385... The number of data missing at each position varies, usually 26 or 27.
So how can I solve the data missing problem? Thank you!
Show LessHello. Recently I'm reading an application note Designing a GPIF™ II Master Interface on http://www.cypress.com/?docID=47100.
On page 8 it says " The time taken for the DMA channel to switch to the next buffer is not deterministic, although it is typically of the order of a few microseconds. "
I tested the time mentioned above using FLAGA in the GPIF state machine, and found it related to the GPIF clock frequency, For example, if the frequency is 96MHz, the time is about 600ns. If the frequency is 12MHz, the time is about 2us, If the frequency is 375kHz, the time is about 38us.
So what factors are controlling the DMA to convert buffers? Which clock is driving this DMA behavior? Can we calculate the conversion time given a GPIF clock frequency?
Thank you!
Show Lesshello everybody,
i am working on interface between image sensor and FX3.
I used the description of example USBVideoClass and of course I modified sensor.c that allows to I2C to communicate with my Image sensor.
Of course, at the end I compile my app but these is a problem that occur.
I've attached screenshot of this problem on Eclipse. Thanks to help me
Show LessHi,
I am using the UART DMA mode example which came through SDK installation.
In this mode i want to send a single byte to FX3(Consumer) and again the Fx3 will send back to the UART(Producer).
Here i have registered a Callback for this UART interrupts.
But its not at all coming inside the callback function.
So i have disabled the callback for the UART.
I have created a callback for DMA channel and in that callback for producer event i am commiting the buffer using commitbuffer API.
Now the problem is if i gave a single byte the producer event is not occuring, after 32 bytes only its occuring.
I want that for single byte.
If anyone having any idea on this issue.
help us. thanks in adavance.
Regards,
Shanthakumar
Show LessIn both of USB2.0 and USB3.0 specification, 3*1024 transfers are possible in one isochronous micro frame, so if you implement UVC example in ISO mode with FX3, you should make sure that there are more than 2049 bytes available in the buffer committed to USB, the reason is shown in the forum: http://www.cypress.com/?app=forum&id=167&rID=69873.
Different image resolutions and bit depths cause different size of data payloads in the end of frame buffer.
For example,
here create GPIF II project 640x480 pixels; 30fps; 16 bits per pixel
Hence, total bytes per frame = 640*480*2 = 614400.
In firmware, DMA buffer size is 3*1024 (3072 bytes) included 12 bytes header and 4 bytes footer, actually, the producer buffer size should be 3072-12- 4 = 3056.
Since each micro frame will send out 3056 bytes of pixel data, it will take 202 micro frames to transmit all data 614400 bytes.
The first 201 micro frames are full with 3072 bytes, and the last micro frame only has 144 byte.
In order to leave more than 2048 bytes in the last micro frame, we commit the buffer when 3046 bytes are received.
In above condition, we will commit 3046 bytes in each micro frame, and the count is 201, and then we will get the 2154 in the last micro frame.
201*3046 +2154 = 614400.
In Cypress UVC ISO project, set CY_FX_UVC_BUF_FULL_SIZE = 3046 for this resolution.
Show LessHello everybody, i am midrel.
I am working on interface between an image sensor and FX3. I'm using the example about this but in pdf file AN75779 page 28 we must complete function SensorScaling_HD720p_30fps in sensor.c file because it is empty.
something like that,
/* Function to set the image sensor in HD720 streaming mode. */
void SensorScaling_HD720p_30fps(void) {
/* Populate particular sensor control commands that will setup the image sensor to stream
1280 * 720 at 30 FPS in this function.
*/
return;
I understand that I must put informations about resolution or others things but where could I take "image sensor-specific configuration commands" ?
Thanks to help me !!
Show LessASUSTek Z87-K mainboard with Intel USB Host Controller
Windows 7 64Bit
CYUSB3014 SDK 1.3.3
Altera FPGA(EP4CE22) ==> CYUSB3014 ==> USB3.0 ==> Computer
FPGA write a low speed stream ( < 25Mbit/S ), CYUSB3014 use slfifosync example
transmit data, Streamer.exe receive data in Computer.
Under USB 3.0 mode, I change Packets per Xfer to 1 and set Xfers to Queue to 1.
Streamer.exe display Xfers failures every time ! there are more error at lower
speed.
But no error at high speed ( > 200MBit/S ).
At USB2.0 mode (use a usb 2.0 cable connect), every thing is OK.
Use slfifosync example in CYUSB3014 SDK 1.3.3.
Changes:
cyfxslfifosync.h
#define CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT (0) ==> #define
CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT (1)
Use EZ USB Suite build it and use CyControl.exe write to CYUSB3014 RAM .
VHDL in FPGA:
----------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_unsigned.all;
ENTITY USBData IS
PORT(
NRST : IN STD_LOGIC;
SYSCLK : IN STD_LOGIC;
USB_DQ : INOUT STD_LOGIC_VECTOR(31 DOWNTO 0);
USB_FLGA : IN STD_LOGIC;
USB_FLGB : IN STD_LOGIC;
USB_INT : IN STD_LOGIC;
USB_CS : OUT STD_LOGIC;
USB_WR : OUT STD_LOGIC;
USB_RD : OUT STD_LOGIC;
USB_OE : OUT STD_LOGIC;
USB_A0 : OUT STD_LOGIC;
USB_A1 : OUT STD_LOGIC;
USB_PKT : OUT STD_LOGIC
);
END USBData;
ARCHITECTURE Bodys OF USBData IS
CONSTANT BURSTSIZE : INTEGER := 128;--USB BURST LENGTH: 16*4=64 BYTE
128*4=512 BYTE 256*4=1024 BYTE
CONSTANT IDLETICKS : INTEGER := 50000;
SIGNAL sBit : STD_LOGIC;
SIGNAL nDataCount : INTEGER:= 0;
SIGNAL nIdleCount : INTEGER:= 0;
SIGNAL nState : NATURAL RANGE 0 TO 3;
BEGIN
PROCESS(NRST, SYSCLK)
BEGIN
IF NRST = '0' THEN
USB_DQ <= (OTHERS=>'Z');
USB_CS <= '1';
USB_WR <= '1';
USB_RD <= '1';
USB_OE <= '1';
USB_A0 <= '0';
USB_A1 <= '0';
USB_PKT <= '1';
sBit <= '0';
nDataCount <= 0;
nIdleCount <= 0;
nState <= 0;
ELSE
IF RISING_EDGE(SYSCLK) THEN
USB_DQ <= (OTHERS=>'Z');
USB_CS <= '0';
USB_WR <= '1';
USB_RD <= '1';
USB_OE <= '1';
USB_A0 <= '0';
USB_A1 <= '0';
USB_PKT <= '1';
CASE nState IS
WHEN 0 =>
nIdleCount <= nIdleCount + 1;
IF nIdleCount = IDLETICKS THEN
nIdleCount <= 0;
nDataCount <= 0;
nState <= 1;
END IF;
WHEN 1 =>
IF USB_FLGB = '1' THEN
IF nDataCount < BURSTSIZE THEN
nDataCount <= nDataCount + 1;
sBit <= NOT sBit;
USB_DQ <= (OTHERS=>sBit);
USB_WR <= '0';
ELSE
nState <= 0;
END IF;
ELSE
nState <= 0;
END IF;
WHEN OTHERS =>
nState <= 0;
END CASE;
END IF;
END IF;
END PROCESS;
END Bodys;
----------------------------------------------------------------
The VHDL codes write to CYUSB3014 with 0xFFFFFFFF00000000FFFFFFFF00000000...
Burst length is 512 bytes,
Idle ticks set to 10000,
The clock from FPGA'pll is 90MHz,
I change IDLETICKS to any value to check speed.
If IDLETICKS = 10000, bit stream speed is (128*32)/((129+10000)/90000000) =
36.4M bit/S
If IDLETICKS = 50000, bit stream speed is (128*32)/((129+50000)/90000000) =
7.35M bit/S
At USB 3.0 mode, the lower the rate, the more errors.
What can i do on this problem ?