USB superspeed peripherals Forum Discussions
We are using the Cypress example code SlaveFifoSync. The demonstration host application GUI USB Control center works fine with our FPGA design for single transactions.
We have developed a host side application in C++ that exercises the API XferData() method function for reads and writes (each from the appropriate handle).
We have also connected to the Cypress card over a serial link in order to observe output of the CyU3PDebugPrint that the firmware source code is instrumented with.
What we initially observe on the firmware console debug are messages that appear at 1 second intervals that confirm that the firmware is in good working order.
When we run our host application which comprises a sequence of calls to XferData() for reads and writes (to CSRs in our FPGA design) is that a varying number of these complete successfully and then there is an apparent hang where some access never completes. On the debug console, the messages emitted at 1 second intervals have stopped.
We have further instrumented the firmware source code with CyU3PDebugPrint and isolated a function that never seems to return:
status = CyU3PDmaChannelCommitBuffer(chHandle, input->buffer_p.count,
0);
We have also attached a logic analyzer on the slave bus between the Cypress card and the FPGA and observed that expected transactions are not appearing at the interface when we expect Cypress to drive the bus.
We have found that introducing a delay (Sleep()) of 100 milliseconds into the host application after each call to the Cypress API XferData is sufficient to cause all the host generated accesses to proceed normally. We have observed that a delay of 10 milliseconds is insufficient.
That we need to pace the host application to workaround an apparent firmware issue is unacceptable. Our application requirements for full speed application cannot tolerate even a delay of 10 milliseconds. What we want is a stable, production ready code that implements the functionality of SlaveFifoSync at full speed.
We assume that customers using this chip in production must be using a fullspeed version of this firmware - please let us know if we can have access to this or if the expectation is for us to somehow develop our own.
I'm trying to get a system based upon AN75779 to work. I'm running under Linux (kernel 4.12.5).
When I run
v4l2grab -m -q 100 -d /dev/video0 -o /tmp/grab.jpg
When I run v4l2grab I get the following output
Image width set to 1280 by device /dev/video0.
Image height set to 720 by device /dev/video0.
and then it just hangs.
On my FX3 console I observe that streaming is activated when I start v4l2grab
UVC: Completed 0 frames and 0 buffers
UVC: Completed 0 frames and 0 buffers
UVC: Completed 0 frames and 0 buffers
UVC: Completed 21 frames and 3 buffers
UVC: Completed 42 frames and 19 buffers
UVC: Completed 63 frames and 35 buffers
UVC: Completed 84 frames and 51 buffers
UVC: Completed 106 frames and 9 buffers
However, in the Linux host kernel log I observe:
[ 7446.534814] uvcvideo: Found UVC 1.00 device FX3 (04b4:00f9)
[ 7446.536477] uvcvideo 2-6:1.0: Entity type for entity Extension 3 was not initialized!
[ 7446.536482] uvcvideo 2-6:1.0: Entity type for entity Processing 2 was not initialized!
[ 7446.536485] uvcvideo 2-6:1.0: Entity type for entity Camera 1 was not initialized!
[ 7446.536654] input: FX3 as /devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.0/input/input13
[ 8488.136849] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: 1 (exp. 2).
What is the error "Failed to query (GET_DEF) UVC control" caused by?
v4l2grab works fine if plug in a plain USB web camera.
Show LessHi,
I was just trying to understand the example code given in "cyfxusbdebug" under basicexamples, but when I am trying to read the EP 81 from host application(using "cyusb_interrupt_transfer(h1,INTERRUPT_EP,buf,128,&transferred,0);"), nothing is coming as output. Need some help to understand how the debug logs can be get over usb via interrupt EP.
Thanks & Regards,
Durga Chhangani
Show LessHi,
I am having trouble to using CCyControlEndPoint read/write for C++ console application on host. The code actually from Cypress library document. The FX3 firmware is the UsbSpiDmaMode sample code.
My issue is the ept->Write/Read function always return false. I also tried on Control Center C# code, it returns true.
Anything I might have done wrong?
CCyControlEndPoint *ept = USBDevice->ControlEndPt;
bool bXferCompleted = false;
// Just for typing efficiency
ept->Target = TGT_DEVICE;
ept->ReqType = REQ_VENDOR;
ept->ReqCode = 0x07;
ept->Value = 1;
ept->Index = 0;
unsigned char buf[512];
ZeroMemory(buf, 512);
LONG bytesToSend = 128;
bXferCompleted = ept->Write(buf, bytesToSend);
Thanks,
Dick
Show LessHello,
I have setup appropriate usb descriptors for interrupt endpoint and PC can detect it as the control center shows everything as expected. When I am sending the data from pc, I am not sure how to extract it in the firmware. Which event shall I expect and which api need to be used to get the data? Can anybody point me to the example or documentation?
Regards.
Show LessHi,
I am trying to do a console application using CyUSB.dll. For some reason, I just can't add the dll to the project. See attached screen shot.
My question is "am I able to reference to CyUSB.dll" for VS console application? I am using SDK 1.3.
Thanks,
Dick
Show LessHi,
I am using SuperSpeed Explorer Kit to develop code communicate with SPI slave device. The issue I have is the debug port, I only can see the debug output in USBBulkSourceSinkLED project, none of other project such as UsbSpiDmaMode debug port works.
I have been tried many sample project from SDK, none of them work too. Since USBBulkSourceSinkLED works, I am assuming the hardware is fine.
I checked the code, it's pretty much the same code to init and DebugPrint() function. Not very sure what's going on.
Any suggestions or anything I am missing here.
Thanks,
Dick
Show LessIn CYUSB 3025 after downloading FX3 Massstorage from SDK, it only detects SDHC, SDXC UHS-1 is not detecting.. please help.
I have given 3.3V in both S0 and S1 ports.
Do we need 1.8V for reading SDXC UHS -1 cards.?
Show LessIt will just stop sending data to the host after some time (minutes).
Most of the time i get "Error in multichannelcommitbuffer: Code = 71, size = 3FFF, dmaDone 0-7" error, but sometimes it just stops outputting frames without it (the COM port stops printing the frame numbers, i've even made it just output + or - instead of full frame number in case that was delaying the CPU enough to break it, but no.). Sometimes it is enough to just disconnect/reconnect the video stream in virtualdub/OBS, sometimes the ARM cpu needs a reboot to fix the stall.
And sometimes it does this: https://images.sshnuke.net/2016-01-04_00-38-57.png the clear feature request was initiated by me to try and re-start it, but now its stuck and requires a reboot.
The example is exactly the code with the AN, i just set 32bits to true in the C code, then in the GPIF2 editor made the requested modifications for 32bit operation: counter limits set to 4091. I've also modified the descriptor for 720p60 operation.
The waveforms of FV and LV are as such: https://images.sshnuke.net/2016-01-04_00-41-06.png
FV goes high at the same time as first LV does, to give the ARM CPU as much time to reset DMA and state machine as possible (it is 407uS of LOW value of FV in that screenshot)
This unstable behaviour is quite unacceptable for a 'complete' video solution...and you cannot really debug the GPIF2 state machine/DMA engine, just the ARM cpu, so how does this get fixed into a usable video device ? This is all in Release mode btw, not Debug.
EDIT: This is what it looks like when it requires a ARM reboot to get unstuck: https://images.sshnuke.net/2016-01-04_01-15-41.png
The 'backflow detect' feature does print backflow detected when it stops working, but does nothing to recover from the situation.
USB Analyzer screenshot of one of the situations: https://images.sshnuke.net/2016-01-04_09-13-03.png
It would seem that adding some more code to properly 'unstick' the DMA channels in the case the host could not consume all the data (so that the next frame keeps working) would make this example work properly.
Show Less