USB superspeed peripherals Forum Discussions
Hello, I am using the following method to test the usb 3.0 read and write rate of cyusb3014, I first verify that usb is successfully enumerated in the way of 3.0, I have tried the data transmission of synchronous and asynchronous methods, but the transmission rate has been limited to 30MB per second, I would like to ask if I have a better test method or because of other reasons, thank you
Show Less
I am trying to implement a variable USB configuration descriptors for my FX3 application to allow different features to be included under different conditions. To do this, I am creating a uint8_t pointer and using malloc to allocate the correct amount of memory and then use memcpy to fill in the required data. However, when I go to compile my program I am getting an error:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/arm-none-eabi/lib\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0x18): undefined reference to `_sbrk'
collect2.exe: error: ld returned 1 exit status
cs-make: *** [USBVideoClassBulk.elf] Error 1
It seems that there is a missing define that malloc requires and I am unsure how to provide it. Looking at this forum post, it seems like adding cyfxcppsyscall.cpp would fix it however I then get errors where `extern char __heap_start`and `extern char __heap_end` are missing.
How do I solve this _sbrk error? Is there a better way to approach variable sized USB descriptors? Using a fixed size array I can create a correct descriptor but am getting error code 10 in device manager.
Show Less我这边分别取了两台电脑,三个批次的电路板,发现如下现象:
1> 编号1 的PC,与最新批次的电路板通过usb3.0接口连接,其上传速度很慢,都在几十k的速率
2> 编号1的PC,与最新批次的电路板通过usb3.1接口连接,工作正常
3>编号1的PC,与前两个批次的电路板通过usb3.0接口连接,工作正常
4>编号2的PC,USB3.0/USB3.1与三个批次均正常工作。
根据上述现象,目前不能找到合适的排查方法去锁定问题,电脑主板为 华硕 primeZ590-PLUS WIFI
Show LessI am creating a firmware for a UVC and UAC composite device but am encountering an error when trying to stream UVC data. In my Wireshark captures there is a URB_FUNCTION_ABORT_PIPE packet before the actual data comes through the device. This appears to be related to a CYU3P_USBEP_SS_SEQERR_EVT error and CLEAR_FEATURE packet is being sent however I am having difficulty determining why my code isn't handling it properly. I am using an endpoint callback to stall the USB endpoint (CyU3PUsbStall (CY_FX_EP_VID_BULK, CyTrue, CyFalse) when CYU3P_USBEP_SS_RESET_EVT is received and I am clearing the stall condition in my USB callback
if ((bTarget == CY_U3P_USB_TARGET_ENDPT) && (bRequest == CY_U3P_USB_SC_CLEAR_FEATURE))
{
if (wIndex == CY_FX_EP_VID_BULK)
{
CyU3PDebugPrint(4, "Video CLEAR_FEATURE, request=0x%x\r\n", bRequest);
/* Clear the stall condition and sequence numbers. */
CyU3PUsbStall (CY_FX_EP_VID_BULK, CyFalse, CyTrue);
CyFxUVCApplnAbortHandler();
}
}
I just switched from having my DMA created in the application initialize function to the stream start functions so maybe that is causing some issue? I have the firmware configured to stop the stream if a CLEAR_FEATURE is received with an endpoint selected, so this prevents any video from streaming. However, if I ignore this CLEAR_FEATURE then data streams after the CLEAR_FEATURE. I have included a Wireshark capture which shows this CLEAR_FEATURE and video streaming after it. Any help finding out why I am getting a CLEAR_FEATURE after streaming negotiation would be greatly appreciated.
I have looked at cyfxgpiftousb, an75779, USBVideoClassBulk and cyfxbulksrcsink examples and have configured my SET_FEATURE and CLEAR_FEATURE requests, the device checks if it is configured and if it is, use CyU3PUsbAckSetup API and otherwise use CyU3PUsbStall API. Specific to an75779 there is an additional handler for CLEAR_FEATURE addressed to an endpoint to abort the stream and this is whats causing my stream to end.
Am I correct that SET_FEATURE is directed at specific interfaces and CLEAR_FEATURE can be directed at an interface or endpoint? From what I have seen in the examples, SET_FEATURE and CLEAR_FEATURE directed at an interface simply check if the device is configured and use CyU3PUsbAckSetup if they are, otherwise CyU3PUsbStall and CLEAR_FEATURE when directed at an endpoint should abort streaming of that endpoint.
Show LessI am developing a UVC device but am confused about how the UVC protocol dictates a stream starts and stops. My UVC operation is based on the AN75779 example. Is my below understanding correct:
A stream starts with a series of negotiation packets (several PROBE packets and then a final COMMIT packet) targeting the VideoStreaming interface. These packets negotiate the resolution and frame rate that the stream will run at. Once the negotiation is complete, the COMMIT packet signals the start of the stream.
When a stream is set to close, a CLEAR_FEATURE is sent to the video endpoint followed by a SET_FEATURE targeting the interface. The CLEAR_FEATURE causes an endpoint reset according to the cyfxgpiftousb example and I am not sure what the SET_FEATURE does; AN75779 simply acknowledges if the device is configured and stalls otherwise.
I had some questions based on what I have seen:
1. When is the UVC stop function actually called? In my experience, the stream end and the FEATURE requests stop data from flowing through the FX3 but it never actually calls the UVC stop function. The only way Ive seen it called is through the frame timer. However when I implemented the frame timer for 1080p30 it resulted in an unstable output, like requesting a stream start while the stream was still active and the timer was counting missed frames.
2. Part of the previous question, what is the role of the frame timer? In the UVC example, the frame timer is used to detect stalls but why and when is this needed? When I implemented it, it only counted down if I closed the camera application I was using, when presumably the CLEAR_FEATURE told the application to stop sending data (and thus the timer was not needed).
3. Before streaming starts, I always see a FUNCTION SUSPEND SET_FEATURE packet with wInterface equal to 0. What do these mean? They are consistently 0.4s before the stream negotiation starts. Are these notifications to exit any LPM I am in? Again, these requests are ACKed if the device is configured and otherwise stalled.
Thanks,
Show Less
Hello,
My PC system is Win10. I'd like to know how to check my AMCAP.exe supports RGB888, RGB32... in UVC mode or not? And my final question was posted in: https://community.infineon.com/t5/USB-superspeed-peripherals/FX3-FPGA-with-GPIF-II-displays-black-screen-when-using-amcap-exe-and-720p-RGB888/m-p/467553#M34967 .
Thanks
Show LessHi everyone,
at the beginning of the year some colleagues of mine got word at the Embedded World that there are plans for a new generation of the FX3 controller. Are there already any information for this new generation available or is there any person we can contact for additional information?
Thanks & best regards
I am trying to read from an I2C slave but am getting a CY_U3P_I2C_ERROR_NAK_BYTE_2 I2C error returned by the CyU3PI2cReceiveBytes call. What does this mean and how can I solve it? I have I2C writes working and have double checked my I2C device and register addresses. Below is my I2C read function.
/* Read 1 byte of data fromI2C slave. */
CyU3PReturnStatus_t
CyFxI2CRead1B (
uint8_t slaveAddr, /* Address of the slave to be accessed. Must be 7 bits or less */
uint8_t lowAddr, /* Register address to read from */
uint8_t *buffer /* Storage location for read data */
)
{
CyU3PI2cPreamble_t preamble;
CyU3PReturnStatus_t apiRetStatus = CY_U3P_SUCCESS;
/* Validate I2C slave address as an allowed address */
if (slaveAddr != FPGA_I2C_ADDR)
{
CyU3PDebugPrint(4, "Mismatch I2C addresses, slaveAddr=%d, FPGA_I2C_ADDR=%d\r\n", slaveAddr, FPGA_I2C_ADDR);
return CY_U3P_ERROR_BAD_ARGUMENT;
}
/* Set the parameters for the I2C access */
preamble.buffer[0] = (slaveAddr << 1); /* I2C write so bit 0 = 0 */
preamble.buffer[2] = lowAddr; /* Low address */
preamble.buffer[3] = (slaveAddr << 1) | 0x01; /* I2C read so bit 0 = 1 */
preamble.length = 3; /* Length of preamble */
preamble.ctrlMask = 0x0002; /* Start bit is required after second byte (2rd bit is set) */
apiRetStatus = CyU3PI2cReceiveBytes(&preamble, buffer, 0x01, 0); /* Receive 1 byte of data */
if (apiRetStatus != CY_U3P_SUCCESS)
CyU3PI2cGetErrorCode(&glI2CErrorCode);
CyFxI2CAccessDelay(apiRetStatus);
return apiRetStatus;
}
Show Less
in 2019, I developed an application based on a cx3 and an ov12895 camera based on the 1.3.3 library. Currently, I am working on the transition to the 1.3.4 library, for this to work I commented out a line of code from the library, the file cyu3usbpp.c line 556,
in the comment above it says "Make sure that all USB sockets are disabled."
I don't really understand what I have to do in order to be able to use the 1.3.4 library in full binary mode.