USB superspeed peripherals Forum Discussions
text.format{('custom.tabs.no.results')}
Hello,
I want to read datas from the FPGA, and I did that with the" XferData" function. But I want to keep reading the data to ensure the state in the FPGA process, I failed with using the "for " and "while " ,just like the "error.png". I found that I can read for some times, maybe as 50 - 60 times, then the usb module was not working.....
Best regards,
Little Narrator
Show Less你好, 使用cyusb3014芯片让我的设备与上位机通信。这个过程已经开发完毕,今天发现当有另外一个设备与我的设备同时插在电脑上时,我的代码中CCyUSBDevice无法实例化,一旦执行这句话,程序就crashed了,与此同时:①control center软件也不能正常打开;②我用的其他的设备的上位机软件可以正常工作;③软件提示了一个系统错误如附件图所示。想问问这是什么原因?应该怎么解决?
Show LessHello,
I am working on a project that uses the EZ-USB FX3 USB 3.0 device controller with RTOS from the SDK examples.
Not Important but my current problem is: there is a race condition between Uart access between the AppThread main loop (which is used to sync the UART communication in certain intervals) and the asynchron Usb Setup request Callback handler function. -> USB Message handling UART function is being executed while the main loop UART function is being executed.
What I need to know to fix this is: How is the UsbSetupCB handled.
-> is my RTOS AppThread interrupted (and stopped?) while the Usb Setup request is being handled
or is another thread spawned in the RTOS to handle the UsbRequest in parallel?
general info to convey the setup:
(This is not my code but conveys the structure, USB & UART is set up properly)
AppThread_Entry(){
ApplnInit(void)
for (;;) {
CyU3PThreadSleep(1000);
len = CyU3PUartReceiveBytes(&inBuf, 1, NULL);
}
}
ApplnInit(void){
CyU3PUsbRegisterSetupCallback(AppUsbSetupCB)
}
AppUsbSetupCB(){
case CY_U3P_USB_VENDOR_RQT:
isHandled = VendorRequest(bReqType, bRequest, wValue, wIndex, wLength);
return isHandled;
}
VendorRequest(){
CyU3PUartTransmitBytes(&outBuf, 1, NULL);
CyU3PUartReceiveBytes(&inBuf, 1, NULL);
}
The FX3 SDK cannot currently be compiled from source with the GNU C compiler, and the ARM compiler you're using (RVCT) was last updated in 2010, I think. (There are two issues: One is the code size produced by GNU C is too large to fit, the second is at least one ARMCC-only function is used in the binary-only libraries).
Is there any effort to make the source compileable with GNU CC? Or to update to an ARM compiler that's currently available?
If neither of those are possible, can I request an RFE to allow the stack size of the USB thread to be changed or dynamically set? (Possibly as an argument to the CyU3PUsbStart() call--or in an alternate Ex version of that call). The USB thread's stack is 0x400 by default, which is really tiny.
Thanks for listening!
Show Less
Hello,
We are currently attempting to develop firmware for our custom board based on the CYUSB3065 CX3 platform.
Prior to the development of our desired sensor the IMX258 we are attempting to use interface with an off the shelf OV5640 development board due to the amount of examples available from the Infineon community.
We can see our device in bootloader mode over USB and we can flash firmware to the RAM.
Depending on the firmware we then see the device reboot as the correct device in windows device manager. We have attempted to use the firmware posted here: https://community.infineon.com/t5/USB-superspeed-peripherals/Stream-RAW10-with-24bit-output-format/m-p/189419 by JayakrishnaT_76
When we load this firmware we see the device as a COM device and a UVC camera, but we do not see an image from the camera and when we attempt to connect to the device via serial we get the following message.
We unfortunately did not break out a UART on our design but we did break out JTAG but attempts to talk to the CX3 with our J-link have been unsuccessful. We would like to be able to debug over USB to continue our development.
Can anyone offer some advice for the above issue?
Cheers,
Michael
Show Lessstatic int ManualDmaSetup ( void)
{
CyFx3BootErrorCode_t stat;
CyFx3BootDmaSocket_t sockConf;
/* Make sure the sockets are disabled at start. */
CyFx3BootDmaDisableSocket (CY_DMA_PIB_SOCKET_0);
CyFx3BootDmaDisableSocket (CY_DMA_UIB_SOCKET_CONS_1);
CyFx3BootDmaDisableSocket (CY_DMA_UIB_SOCKET_PROD_1);
CyFx3BootDmaDisableSocket (CY_DMA_PIB_SOCKET_1);
// Configure the DMA descriptors for both producer and consumer.
stat = ConfigureDmaDescriptors ();
if (stat != CY_FX3_BOOT_SUCCESS)
return stat;
// Configure the producer socket on the GPIF side
sockConf.dscrChain = PRODUCE_DESCRIPTOR_BASE;
sockConf.xferSize = 0;
sockConf.xferCount = 0;
sockConf.status = CY_U3P_TRUNCATE | CY_U3P_EN_PROD_EVENTS | CY_U3P_SUSP_TRANS;
sockConf.intr = 0;
sockConf.intrMask = 0; // Disable interrupt on produce event.
stat = CyFx3BootDmaSetSocketConfig (CY_DMA_PIB_SOCKET_0, &sockConf);
if (stat != CY_FX3_BOOT_SUCCESS)
{
return stat;
}
// Configure the EP1IN socket on the USB side
sockConf.dscrChain = PRODUCE_DESCRIPTOR_BASE;
sockConf.xferSize = 0;
sockConf.xferCount = 0;
sockConf.status = CY_U3P_TRUNCATE | CY_U3P_EN_CONS_EVENTS | CY_U3P_SUSP_TRANS;
sockConf.intr = 0;
sockConf.intrMask = 0; // Disable interrupt on produce event.
stat = CyFx3BootDmaSetSocketConfig (CY_DMA_UIB_SOCKET_CONS_1, &sockConf);
if (stat != CY_FX3_BOOT_SUCCESS)
{
return stat;
}
/* Enable the sockets for transfer. */
CyFx3BootDmaEnableSocket (CY_DMA_PIB_SOCKET_0);
CyFx3BootDmaEnableSocket (CY_DMA_UIB_SOCKET_CONS_1);
CyFx3BootDmaEnableSocket (CY_DMA_UIB_SOCKET_PROD_1);
CyFx3BootDmaEnableSocket (CY_DMA_PIB_SOCKET_1);
//CyFx3BootUartPrintMessage ((uint8_t *)UART_DMA_BUF_ADDRESS, 256, "Sockets enabled\r\n");
return 0;
}
static int ConfigureDmaDescriptors ()
{
CyFx3BootErrorCode_t stat;
CyFx3BootDmaDescriptor_t dscrConf;
uint16_t i, j;
// Producer descriptor chain: Base descriptor index is 4. from Fifo Read to EP1IN
for (i = PRODUCE_DESCRIPTOR_BASE, j = 0; j < DMA_BUF_COUNT; i++, j++)
{
dscrConf.buffer = (uint8_t *)(DMA_BUF_BASE + j * DMA_BUF_SIZE);
dscrConf.sync = CY_U3P_EN_PROD_EVENT |
(CY_DMA_PIB_SOCKET_0 << CY_U3P_PROD_SCK_POS) |
CY_U3P_EN_CONS_EVENT |
(CY_DMA_UIB_SOCKET_CONS_1 << CY_U3P_CONS_SCK_POS);
dscrConf.chain = (j == (DMA_BUF_COUNT - 1)) ?
((PRODUCE_DESCRIPTOR_BASE << CY_U3P_RD_NEXT_DSCR_POS) |
(PRODUCE_DESCRIPTOR_BASE << CY_U3P_WR_NEXT_DSCR_POS)) :
(((i + 1) << CY_U3P_RD_NEXT_DSCR_POS) | ((i + 1) << CY_U3P_WR_NEXT_DSCR_POS));
dscrConf.size = (DMA_BUF_SIZE);
stat = CyFx3BootDmaSetDscrConfig (i, &dscrConf);
}
}
Hi,
Problem Summary:
1. CyU3PI2cReceiveBytes function call does not work normally.
2. Using the same board and function and seeing the i2c read operation perform well in the code before applying the cdc interface, I suspect there is a problem with the current version of the code.
I am attempting to send serial data via COM port in the FX3 UVC + CDC interface combination and to perform i2c communication with that serial data.
For example, if I want to write the value 0x0003 in the register address 0x0001 of the device with the slave address 0x18, I send five bytes of [0x18, 0x00, 0x01, 0x00, 0x03] through Serial communication, and I send these five bytes as a factor of the SensorRead function, and I configure Preamble.
In previous configurations that do not use the CDC, the i2c functions and boards are operating normally, but the code modified by applying the CDC is not performing the i2c read operation normally.
For i2c read, I sent the appropriate serial data(Python) and even checked that the correct value is transmitted to the function in fx3. But below is the serial log.
0x0001 must be read from the address of 0x01 but the value of 0xFFFF is returned.
It also repeats the apiRetStatus values of 0 and 0x55.
What are the problems that cause this phenomenon?
Attached is the uvc.c code.
Thanks.
Show LessI used the example with the AN65974 exmaple "SlaveFifoSync" , I just change the watermark and the file "cyfxgpif2config.h" and set the #stream_inout . Then I transfered the data from my FPGA, I recived the datas, but I found that there lost a value between my datas, this wrong could be showed in the error1.png and error2.png.
How can I deal with them?
Show LessHello,
I am considering CYUSB3064/CYUSB3065, which is the evaluation board?
Can you give us some information about the evaluation board?
Regards.
Show Less