USB superspeed peripherals Forum Discussions
This forum text editor is quite broken in Chrome on my machine, by the way.
I uploaded the USBBulkSourceSink firmware to my FX3 dev board. I then ran the C# streamer example, selecting the 0x81 IN endpoint. No matter what combination of other settings in the other comboboxes, after a few seconds it kicks into an error state where every transaction fails. At this point you have to reset the device before any transactions will succeed again (restarting streamer has no effect). As it turns out, LastError was set to 997.
I made a much simpler client application without any Overlapped I/O (just using the XferData method), and I ran into the same thing -- it runs for awhile, and then no XferData calls succeed, and LastError is 997. You will remain in this state even if you re-run your client application, you have to reset the device to clear it.
Plus, if you specify a transfer size that isn't a power of two (I used 4097), it will stop immediately without reading any bytes with error 997.
I am on 64-bit Windows 7 on an 8 core machine.
My code is as follows, but it's readily reproducible with the streamer example:
static void Main(string[] args)
{
var usbDevices = new USBDeviceList(CyConst.DEVICES_CYUSB);
var myDevice = usbDevices[0x04B4, 0x00F1] as CyUSBDevice;
if (myDevice == null)
{
System.Console.WriteLine("No device. Try again when you have one.");
return;
}
var endpoint = myDevice.EndPointOf(0x81);
var data = new byte[(args.Length > 0) ? int.Parse(args[1]) : DefaultBufferSize];
ulong totalBytesRead = 0;
var stopwatch = new Stopwatch();
System.Console.WriteLine("Using buffer size of {0}", NumberBytesToString((ulong) data.Length));
System.Console.WriteLine("Timeout is {0}", endpoint.TimeOut);
stopwatch.Start();
while (true)
{
int numberBytesRead = data.Length;
if (!endpoint.XferData(ref data, ref numberBytesRead))
{
if (endpoint.LastError != 0)
{
throw new Win32Exception((int) endpoint.LastError);
}
else
{
throw new Exception("Unknown XferData error");
}
}
if (numberBytesRead < data.Length)
{
System.Console.WriteLine("Short read of {0}", numberBytesRead);
}
totalBytesRead += (ulong) numberBytesRead;
System.Console.Write("\r{0}/s", NumberBytesToString(((totalBytesRead * 1000) / (ulong)stopwatch.ElapsedMilliseconds)));
}
}
My ultimate goal is to marshal data through the GPIF through a bulk IN endpoint, and I was starting with this example code as a baseline. But as far as I can tell, either a) the firmware is busted, or b) the C# client library is.
Is the streamer example supposed to work better with a different firmware? I just care about IN data, I don't want to loop data OUT and back IN, I just want the FX3 to send data as fast as possible, and then process it as fast as possible on the PC side. Is there an example firmware and client app that can do this?
Thanks in advance.
Show LessHi,
I am working with USB FX3 with given example codes in application note AN65974. I am working for 16 bit GPIF interface with FPGA. I am able to program FX3 device for stream OUT and loopback mode with given firmware .img files after building for 16 bit mode and these are working fine. but for stream in case, when I want to program FX3 with .img firmware file, that time in control center it is not showing anything but displaying programming succeeded. So, I'm not able to check throughput in streamer. I am attaching one image related to this. Please give me your suggestion to come out from this problem.
Regards,
Vipin
Show LessI opened a support case about thisabout a week ago on invitation from a Cypress employee, but it has been completely ignored. The employee wrote to me, unsolicited, for help with his app note then said I should raise a case about my questions rather than him answering them as it was not his problem. Here's the case which is being ignored:
Subject
FX3 Power supplies
Description
I need to know the current requirement of the VBUS pin. The data sheet speaks of a large number of separate supply pins but only mentions two current values without relating these to the voltage names. So there is no way to know how much current is drawn by VBUS. Is it ICC USB? Or is it just a supply for the tranceiver and pullups and therfore much smaller?
I am making a self powered device. I believe I can supply 5V to VBUS on the FX3, from a supply rail in my device, but only connect it when the host is connecting 5V to the receptacle. This should avoid damage from excessive external supplies.
I then also have to know what to do with VBATT as I don't have a battery. My best guess is to connect it also to 3.3V or 5V, though I have no idea how to justify this as VBATT is not really explained.
At any rate this requires me to be able to estimate the power required by these pins.
The other question I have is whether there is any need or benefit from power supply sequencing?
Show LessHi,
I amusing Segger J-Link to debug the firmware. I followed the steps outlined in section 12.3 of Programmer's Manual but I end up with the following error:
660^done
(gdb)
661-data-disassemble -s 0x0 -e 0x3c -- 1
661^error,msg="Cannot access memory at address 0x40010758"
(gdb)
662-data-disassemble -s 0x1 -e 0x45 -- 1
662^error,msg="Cannot access memory at address 0x40010758"
(gdb)
663-data-disassemble -s 0x2 -e 0x46 -- 1
663^error,msg="Cannot access memory at address 0x40010758"
(gdb)
...............
How do I resolve this one?
Thanks!
Show LessHi, I'm designing a usb device around the USB FX3. I have a few questions I hope contributors might be able to help me with:
1) In my application, data transfer speed is is very important. I require at minimum 200 MB/s. From what I've read, the FX3 is more than capable of this, but performance is very host-controller dependent. As I need to acquire a new PC for development, is there any chipset (or even better, laptop from e.g. Dell/Lenovo ) that somebody could recommend?
2) I'm somewhat concerned about PHY errors and the abrupt termination of superspeed transfers (see the related thread). The error rate apparently seems to be heavily dependent on noise from the GPIF switching, cable length, and clock quality. With respect to noise from the GPIF, beyond the obvious preference of 1.8 V over 3.3, is there any specific PCB layout that could mitigate switching noise? I could do some electromagnetic simulations, but if anybody's got any tried and true methods, I 'd be happy to hear about them. Regarding clock quality, I have at my disposal an extremely low jitter LVDS clock that I can program to any frequency (a nice side effect of having ADCs in the design). I would imagine this is my best option (along with very clean clock power). The question then is frequency (19.2, 26, 38.4, or 52 MHz). As I don't know the FX3's internal structure, I can only guess that 52 MHz might possibly result in the lowest jitter in the device's PLL. Is this correct?
Any advice would be very much appreciated!
D.
Show LessHi Everybody.
I lost my post, so i repost this question.
I'm using FX3 and GPIO Slave FIFO Interface with FPGA.
BulkOut Endpoint somtimes fail to XferData.
I used medify SlaveFIFO Application firmware.
( When I use USBBulkSourceSink firmware, XferData working good. )
XferData return value is false.
UsbdStatus=0xc0000011, UsbdStatus=0xc000009d
If an error occurs, the USB is look list reenumuration.
========================This is UART Log Message========================
About to connect to USB host
CY_U3P_USB_EVENT_CONNECT detected (1)
appUSBInit complete
CY_U3P_USB_EVENT_SETCONF (1)
appStart
fail to XferData ....
CY_U3P_USB_EVENT_RESET or CY_U3P_USB_EVENT_DISCONNECT (1)
appStop
No Error :18(12) <= Displayed this message from appGpifErrorCallback Function
CY_U3P_USB_EVENT_SETCONF (1)
appStart
========================GPIO Error Callback Function========================
void appGpifErrorCallback(CyU3PPibIntrType cbType, uint16_t cbArg)
{
if (cbType == CYU3P_PIB_INTR_ERROR)
{
switch (CYU3P_GET_PIB_ERROR_TYPE(cbArg))
{
case CYU3P_PIB_ERR_THR0_WR_OVERRUN:
zDebugPrintf(4, "CYU3P_PIB_ERR_THR0_WR_OVERRUN\r\n ");
break;
case CYU3P_PIB_ERR_THR1_WR_OVERRUN:
zDebugPrintf(4, "CYU3P_PIB_ERR_THR1_WR_OVERRUN\r\n");
break;
case CYU3P_PIB_ERR_THR2_WR_OVERRUN:
zDebugPrintf(4, "CYU3P_PIB_ERR_THR2_WR_OVERRUN\r\n");
break;
case CYU3P_PIB_ERR_THR3_WR_OVERRUN:
zDebugPrintf(4, "CYU3P_PIB_ERR_THR3_WR_OVERRUN\r\n");
break;
case CYU3P_PIB_ERR_THR0_RD_UNDERRUN:
zDebugPrintf(4, "CYU3P_PIB_ERR_THR0_RD_UNDERRUN\r\n");
break;
case CYU3P_PIB_ERR_THR1_RD_UNDERRUN:
zDebugPrintf(4, "CYU3P_PIB_ERR_THR1_RD_UNDERRUN\r\n");
break;
case CYU3P_PIB_ERR_THR2_RD_UNDERRUN:
zDebugPrintf(4, "CYU3P_PIB_ERR_THR2_RD_UNDERRUN\r\n");
break;
case CYU3P_PIB_ERR_THR3_RD_UNDERRUN:
zDebugPrintf(4, "CYU3P_PIB_ERR_THR3_RD_UNDERRUN\r\n");
break;
default:
zDebugPrintf(4, "No Error :%d(%x)\r\n ", CYU3P_GET_PIB_ERROR_TYPE(cbArg), CYU3P_GET_PIB_ERROR_TYPE(cbArg));
break;
}
}
}
Please Let's me know how to debug this problem?
Best Regards.
Thanks all.
I made FX3 firmware for UVC over ISO endpoint on USB 3.0. It is working on Windows 8, Linux and MacOS, but doesn't work on Windows 7 (doesn't even start stream). I suspect that UVC class driver on Windows 7 doesn't support burst on ISO, but I cannot find any information about that. Is there any information about that or has anyone tried that?
Show LessHello All,
What is the difference between EZ-USB® FX3S™ and EZ-USB FX3™?
Can I use EZ-USB FX3 development kit to evaluate the basic functionality i.e.
External Processor -> EZ-USB® FX3S™ -> USB3.0
Show LessHello All,
What is the difference between EZ-USB® FX3S™ and EZ-USB FX3™?
Can I use EZ-USB FX3 development kit to evaluate the basic functionality of EZ-USB® FX3S™.
External Processor -> EZ-USB® FX3S™ -> USB3.0
Show LessHello All,
What is the difference between EZ-USB® FX3S™ and EZ-USB FX3™?
Can I use EZ-USB FX3 development kit to evaluate the basic functionality of EZ-USB® FX3S™.
External Processor -> EZ-USB® FX3S™ -> USB3.0
Show Less