USB superspeed peripherals Forum Discussions
Hello,
after reading the manuals I still have some questions...
1) A Socket is connection between device and memory... right? So for streaming I need at least 2 sockets. One from FX3(GPIF) to memory and one from memory to i.e. USB ... this is what called producer and consumer socket... is that right so far?
2)When do the consumer stream data from memory to usb? when the buffer is full? So if i alocated 1024bytes for dma_buffer the socket will send data after 1024bytes are full?
3)After a socket red or wrote data it takes some time for it to get the dma again? So if I want to stream as quick as possible I have to have multiple producer, because the consumer can reset it self while the producer is writing new data.
In thet case if every point is right...
for maximal performance in streaming i would need 4 threads with 4 producer sockets and 1 consumer... and from now on i don't have an idea how should they work?
I mean do i link 4 sockets to differen buffer and all of the buffers to one consumer?
PS: and how do I init 2 threads? So I can use in GPIF II TH0 and TH1?
Show LessHi,
I'm using FX3 in a USB bus-powered camera system and build the according firmware with FX3 SDK 1.3.3.
We have an USB issue during Startup of the camera where in about 1 of 500 Startups the camera doesn't enumerate at the USB root hub. It occurs as an "Unknown Device" in the device Manager.
The PC Setup is as follows:
OS: Windows 10 64bit, Version 1809, build 17763.379
CPU: i7-4790
RAM: 16GB
USB Host Controller: Intel chipset
USB Host Controller Driver: 17763.379 14.09.2018
We disabled the USB LPM in the PC host-System since we want to avoid running into the issue where FX3 is not able to leave U1/U2 in some cases (acc. to Cypress Troubleshooting guide Version 1.3.3, chapter 2.2 "Unexpected Connection Failures").
The use case is:
1. camera is plugged to USB 3-port of PC and works fine
2. the PC is shutdown
3. if the PC is down the USB-ports aren't powered anymore so the camera is off (LED is off)
4. the PC is powered on
5. in ~1 of 500 cases the camera is not available in Windows device Manager after Windows has booted:
- In the case of error the LED of the camera tells us that the camera is in USB HighSpeed-mode. The USB-Speed is signaled by LED and is updated twice during Startup-Phase: after receiving USB-Event CY_U3P_USB_EVENT_CONNECT and after receiving USB Standard request SET_CONFIGURATION(1).
- in a good case the USB-Connection during Startup is initially with USB HighSpeed and changes later to USB SuperSpeed
Luckily, we were able to record the issue with LeCroy USB-analyzer. After analyzing the trace we have seen that the FX3 doesn't behave properly with respect to USB specification. In the case of error the host initiates a USB Standard request (i.e. GetDescriptor) using a SETUP-transaction with a DataPacket (DP) but the FX3 doesn't respond with a ACK-packet on it (see attached "ErrorCase.png"). I think, according to USB-spec the device always needs to answer the SETUP DP (as shown in "GoodCase.png") but it could NAK or STALL the consecutive DATA-Transaction if it's not yet ready or has no data or an error occured.
So my questions are :
1. Do you know this Kind of error already and have an appropriate fix for it?
2. If not: can you help me to fix this issue, please?
The whole Thing is quite critical since it's not accepted by our customers that the camera doesn't Startup properly, even in such rare cases like 1 of ~500 Startups.
Thanks!
Best regards,
Robert
Show LessHi,
We are exploring Cypress example code (MSC) for our project. We have not modified anything int the example. But the below dma channel creation failed with bad parameters as a status return,
/* Create a DMA Manual IN channel between USB Producer socket
and the CPU */
/* DMA size is set above based on the USB Bus Speed */
dmaConfig.count = CY_FX_MSC_DMA_BUF_COUNT;
dmaConfig.prodSckId = (CyU3PDmaSocketId_t)(CY_U3P_UIB_SOCKET_PROD_0 | CY_FX_MSC_EP_BULK_OUT_SOCKET);
dmaConfig.consSckId = CY_U3P_CPU_SOCKET_CONS;
dmaConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaConfig.notification = 0;
dmaConfig.cb = NULL;
dmaConfig.prodHeader = 0;
dmaConfig.prodFooter = 0;
dmaConfig.consHeader = 0;
dmaConfig.prodAvailCount = 0;
/* Create the channel */
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleMscIn, CY_U3P_DMA_TYPE_MANUAL_IN, &dmaConfig);
Please guide us to solve this issue,
Thanks and Regards,
Vignesh Kumar R.
Show LessI created a new CX3 Project (called MyImageSensor) using the "CX3 Configuration Tool" utility. After setting up the Image Sensor Configuration and CX3 Receiver Configuration, I saved the resulting cx3config.cycx file. Then, I tried to build the project (release version), and I get two (2) errors, which are listed below:
cs-make: *** [MyImageSensor.elf] Error 1 MyImageSensor C/C++ Problem
undefined reference to `main' cyfx_gcc_startup.S /MyImageSensor line 39 C/C++ Problem
None of the files were modified by me; It looks like that the utility is creating a problem.
Can anyone help?
Thanks and regards,
Mo
Show LessActually, The Uart console get following output:
ÿÿ?bmReqType 0x40 bRequest 0x3 wValue 0x2 wIndex 0x2 wLength 0x0
ÿÿSet ERROR_FLAG
the Correctly ousput should be:
bmReqType 0x40 bRequest 0x3 wValue 0x2 wIndex 0x2 wLength 0x0
Set ERROR_FLAG
Also, I create Timer with CyU3PTimerCreate() and Add the debug message output in the CallBack route,
But I don't see any debug message output.
Show LessHello Guys,
I am absolutely new with this topic.
I created State Machine that basically reads all PINS (32bit) and buffers it in to a thread. So I can fetch it via USB when it is full. Now I want to make a Firmware with 4 Threads, 1024bytes (4 Times the same) and a specific System Clock and my state machine has an output as a clock for Slave from wich I read the 32 bit. So i make an output (clock) and collect the 32 bits.
How do I do this?
I have found a similar named example "gpiftousb".So I just want to put my header from gpif ii in this project and build to get the firmware, but I also want to modify it more to my case:
systemclock 9.6Mhz
4 Threads and
1024byte buffer
and do i have todo anything with my 1 pin for "fake"clock output?
or about send data only if I fetch it
Wich places do i have to look to?
Would be very nice if someone could explained it on "noob to cypress" level
PS: maybe cyfxbulklpauto is even better ?
Show LessHi All,
I use the FX3 to receive the data of camera chip to PC by USB3.0, so I refer the UVC - AN75779 document & example to design the mechanism.
I can use the CyU3PGpifRegisterCallback() to trigger a callback from State Machine - "INTR_CPU", and it's work to receive the data and show on PC.
However, if I replace the CyU3PGpifRegisterCallback() to CyU3PGpifRegisterSMIntrCallback(), it's not work anymore...
The callback will never be triggered, and it causes that the PC cannot receive any data.
Register code:
Callback code:
In the API document, it mentions "Please note that API calls that require a mutex get or equivalent cannot be directly called from this callback function.", but I don't know the meaning, and don't find any mutex for that in the AN75779 example.
Do I miss something? Hope anybody could provide me some suggestion!
Thanks a lot!
Hughes
[Environment]
Chip: CYUSB3014
SDK version: v1.33
DMA mode: auto DMA
Show LessHello,
I downloaded the SDK zip file for Linux, followed README file. First, it is good to write how to install dependencies! especially for beginners like me.
Second, even if you install cyusb_linux GUI app, still when try to build a firmware using mkdir build, build , cmake .., make . you get many errors! one obvious one is to give the ARM compiler file gcc and gpp compilers.
it is good to add step by step and in easy word the procedure.
Thanks,
Show LessHi
In the below reference schematic of the FX3 Type-C Superspeed Explorer Kit a positive overvoltage protection (OVP) controller is used (U11). According to the datasheet, it only supports a maximum current of 600mA (from Vin to Vout). Since both LDOs are hooked up to the output of the OVP, I would assume that the max current the entire board (including potential peripherals connected to the board) can sink is limited to 500mA. Is that correct?
In our own design, we require more than 500mA. I know that the CX3 needs to be shielded with an OVP. Would it be fine to use the OVP only for the CX3 VBUS input and power the LDOs and all the rest directly from VBUS?
Show LessWhy does the firmware usbspidmamode not display BUIK IN and BUIK OUT when downloaded into RAM?
But I saw in the cyfxusbspidmamode. h file
# define CY_FX_EP_PRODUCER 0x01/* EP 1 OUT.*/
# define CY_FX_EP_CONSUMER 0x81/* EP 1 IN*/
Show Less