CyU3PMemSet((uint8_t *)&dmaConfig,0,sizeof(CyU3PDmaChannelConfig_t));
dmaConfig.size = CY_FX_UVC_STREAM_BUF_SIZE;
dmaConfig.count = CY_FX_UVC_STREAM_BUF_COUNT;
dmaConfig.prodSckId = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_0;
dmaConfig.consSckId = (CyU3PDmaSocketId_t)(CY_U3P_UIB_SOCKET_CONS_0 |CY_FX_EP_VIDEO_CONS_SOCKET);
dmaConfig.prodAvailCount = 0;
dmaConfig.prodHeader = 12; /* 要添加的 12 字节 UVC 标头。 */
dmaConfig.prodFooter = 4; /* 4 字节页脚以补偿 12 字节标头。 */
dmaConfig.consHeader = 0;
dmaConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaConfig.notification = CY_U3P_DMA_CB_PROD_EVENT;//CY_U3P_DMA_CB_PROD_EVENT ;;
dmaConfig.cb = CyFxUvcApplnDmaCallback;
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleUVCStream,/*CY_U3P_DMA_TYPE_AUTO_SIGNAL*/ CY_U3P_DMA_TYPE_MANUAL,
&dmaConfig);
if (apiRetStatus != CY_U3P_SUCCESS)
{
/* 错误处理 */
CyU3PDebugPrint (4, “DMA 通道创建失败, 错误代码 = %d\n”, apiRetStatus);
CyFxAppErrorHandler (apiRetStatus);
}
How CyAPI recovers data transmission after accidental USB reconnection
我们当前的解决方案是手动触发CYAPI通过Control End Point通道向CYUSB3014发送一条命令,CYUSB3014固件执行CyU3PDeviceReset函数。这个解决方案存在2个问题。
Our current solution is to manually trigger the CyAPI to send a command to CYUSB3014 through the EP0(Control End Point) channel. The CYUSB3014 firmware executes the CyU3PDeviceReset function. There are two problems with this solution.
第1个:USB连接恢复后的第一次传输异常(后续的传输是成功的)。我们的分析认为CYUSB3014没有清空上次传输失败的数据。如果不调用CyU3PDeviceReset函数,我们就不知道有什么办法恢复CYUSB3014的数据传输。我们尝试过调用CyU3PUsbResetEndpointMemories函数和CyU3PUsbResetEp函数,都没有解决问题。
First: The first transmission fails after the USB connection is restored (the subsequent transmission is successful). Our analysis shows that CYUSB3014 does not clear the data that failed in the last transmission. If the CyU3PDeviceReset function is not called, we do not know how to recover the data transmission of CYUSB3014. We tried to call the CyU3PUsbResetEndpointMemories function and CyU3PUsbResetEp function, but they didn't solve the problem.
第2个:Windows设备管理器会再次刷新。USB连接重连造成Windows设备管理器第1次刷新,CYUSB3014固件执行CyU3PDeviceReset函数后Windows设备管理器发生第2次刷新。我们不希望Windows设备管理器第2次刷新。
Second: Windows Device Manager will refresh again. The reconnection of the USB connection caused the first refresh of the Windows Device Manager, and the second refresh of the Windows Device Manager occurred after the CYUSB3014 firmware executed the CyU3PDeviceReset function. We do not want Windows Device Manager to refresh for the second time.
请指点。谢谢!
Please point out. Thank you!
Show LessMy hardware is a sensor connected to 3014 via DVP. The problem is the DVP signals are good(frame/line valid and the pixel clock). And we can see the firmware enter the CyFxUvcApplnDmaCallback(), however, then get the buffer from CyU3PDmaMultiChannelGetBuffer(), we found the dmaBuffer.count is zero for every callback. The consequence is that the USB host receives many empty USB packages, and no image is presented.
The interesting thing is if we try to reset 3014(may need a few times), it is probably recovering from the exception state.
Any idea for what's going on under this phenomenon? Many thanks
Rossi
Show LessCYUSB3014 意外中断传输后不重启设备不刷新USB连接如何恢复传输?
We have such a requirement: When CYUSB3014 is transmitting data in SuperSpeed mode, the USB is disconnected (for example, the USB cable is unplugged and the power supply is not interrupted), and then the USB is restored. The customer hopes that CYUSB3014 can recover the data transmission without causing the Windows Device Manager to refresh the device. It is not required to recover the data that failed to be transmitted, but only that the new data can be successfully transmitted after the USB connection is restored. Now we only know the method of calling CyU3PDeviceReset method to recover the transmission. This method causes the Windows Device Manager to refresh, which does not meet the customer's requirements. Ask for directions. Thank you.
我们有这样的一个需求:CYUSB3014正在SuperSpeed模式下高速传输数据时USB断开连接(比如拔插USB线,供电未中断),随后USB恢复连接。客户希望CYUSB3014能够在不造成Windows设备管理器刷新设备的情况下恢复数据传输,不要求恢复传输失败的数据,只要求USB恢复连接后新的数据能够成功传输。我们现在只知道调用CyU3PDeviceReset方法恢复传输的方法,此方法造成Windows设备管理器刷新,不符合客户需求。请求指点。谢谢。
Show LessHi,
I've written a custom bootloader for the CYUSB3014-BZXC using the Cypress Boot API. We've been using this bootloader without issue for the past couple of months. However, someone recently plugged the board into a USB 3.1 host controller using a USB 2.0 cable. Upon doing so we discovered that in USB 2.0 mode the device stops responding to standard requests after being suspended and then resumed. The traffic on the USB bus was captured with an Ellisys EX350 and shows the following transactions:
1. get device descriptor (success)
2. set address (success)
3. get device descriptor (success)
4. get configuration descriptor (success)
5. get BOS ddescriptor (success)
6. get serial number descriptor (success)
7. get language ID descriptor (success)
8. get product descriptor (success)
9. set configuration 1 (success)
10. LPM transaction (success)
11. Suspended
12. Resume
13. get language ID descriptor x 6 (failure)
14. get manufacturer descriptor x 6 (failure)
15. get product descriptor x 6 (failure)
UART Debug message prints from the firmware show the following:
Initializing FX3 Boot Firmware 1.6
Boot FW Event: CY_FX3_BOOT_USB_IN_SS_DISCONNECT
Boot FW Event: CY_FX3_BOOT_USB_SUSPEND
Boot FW Event: CY_FX3_BOOT_USB_RESET
Boot FW Event: CY_FX3_BOOT_USB_RESET
Boot FW Event: CY_FX3_BOOT_USB_RESUME
Are there any special actions that the firmware must take when it receives CY_FX3_BOOT_USB_SUSPEND or CY_FX3_BOOT_USB_RESUME in order to get the FX3 to ACK the control requests that take place after the the suspend and resume operations?
We also seem to experience the same problem when running the application firmware (uses Cypress full API) when the device is plugged in with a USB 2.0 cable. The bus activity is similar:
1. get device descriptor (success)
2. set address (success)
3. get device descriptor (success)
4. get configuration descriptor (success)
5. get BOS ddescriptor (success)
6. get serial number descriptor (success)
7. get language ID descriptor (success)
8. get product descriptor (success)
9. LPM transaction (success)
10. Suspended
11. Resume
12. set configuration 1 x 3 (failure)
13. Suspended
So the same question applies for the application firmware: what steps must we take in firmware in order for control transfers to succeed after the device has been suspended and then resumed?
Some other information that you may find useful:
Operating system: Windows 10
Host Controller: Asmedia ASM3142
Hub: none
I appreciate any help you can provide.
Thanks,
Michael
Hi infineon team,
I port my source code ( build using 1.3.1) to 1.3.4 SDK. Upon compiling my code, I get an error message such as SYS_MEM overflowed by 37624 bytes. For this issue, I have modified the fx.ld and cyfxtx.c files. Due to this modification, I need to reduce the UVC_STREAM_BUFF size (previously we used 36KB). But if i reduced the UVC_STREAM_BUFF size, i am facing GET_BUFF_FAILED issue as mentioned in this community link.
As all of our products use 36KB as the standard UVC_STREAM_BUFF size. Currently we are unable to port our code to 1.3.4 SDK.
Our expectation for SDK 1.3.5 is to have some lesser library size. So that I can maintain 36 KB as UVC_STREAM_BUFF size when I port from SDK 1.3.1 to SDK 1.3.5. Please comment on this.
Reagrds ,
Rakesh
@AliAsgar @Rashi_Vatsa @KandlaguntaR_36
Show LessHi infineon team,
I am getting CyU3PDmaMultiChannelGetBuffer Failed with Timeout error code frequently when streaming 1080P resolution in YUV2 format. eventhough im resetting the DMA and streaming was not stopped due to this issue, but i need to stop this CyU3PDmaMultiChannelGetBuffer Failed issue because it was not observed in other resolutions. kindly help me to resolve this issue.
SDK -1.3.4
streaming - 1080P@60FPS
CX3_UVC_DATA_BUF_SIZE 30288
CX3_UVC_STREAM_BUF_COUNT 3
CyU3PMipicsiCfg_t cfgUvc1080pNoMclk_SS_UYVY_60fps = {
CY_U3P_CSI_DF_RGB888, /* CyU3PMipicsiDataFormat_t dataFormat */
4, /* uint8_t numDataLanes */
4, /* uint8_t pllPrd */
99, /* uint16_t pllFbd */
CY_U3P_CSI_PLL_FRS_500_1000M, /* CyU3PMipicsiPllClkFrs_t pllFrs */
CY_U3P_CSI_PLL_CLK_DIV_8, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */
CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t parClkDiv */
0, /* uint16_t mClkCtl */
CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */
1920, /* uint16_t hResolution */
1 /* uint16_t fifoDelay */
};
In probe control:
0x00, 0x90, 0x00, 0x00, /* No. of bytes device can rx in single payload: 36KB */
Thanks and regards,
Rakesh
Show Less
Hello.
The driver resell work you worked on went well. Thank you.
However, the upload to the Microsoft hardware dashboard failed after working with the document.
I am attaching the revised package and error log. Please advise me what is wrong.
Regards
Show LessPMODE[2:0]选择的Z11,使用的EEPROM型号为24L1025I/SN(1024M/Microchip),使用elf2img.exe时加入了设置-i2cconf 0x1E,生成.img文件。再使用Control Centor将固件下载到EEPROM中,但失败了。
1.选择I2C EEPROM
2.选择.img文件
3.过了几秒后,出现Programming of I2C EEPROM Failed
之后,我下载了例程cyfxflashprog,再将其下载到RAM中,进行I2C EEPROM的读写测试,结果表明能对其进行读写操作。
1.向EEPROM写入52 48 48 52
2.读取EEPROM中的信息
目前不清楚问题出现在什么地方,固件本身是在别的设备上CYUSB3014正常使用的(能够烧入EEPROM),并且也使用例程代码尝试向EEPROM烧录但都是不能成功。我应该怎么解决这个问题?
Show LessHi,
I am using CX3 based custom board, I have written my firmware image in SPI flash and my board is enumerating as a device in SPI boot mode. But image streaming is not being done(getting black screen).
My DMA and timer getting restarted continuously. I followed this KBA and changed the timer period and I increased the DMA buffer size. Still I am unable to get image in AMCap or Camera app.
Please find the below log for your reference.
Can you help me in this regard?
Thank you,
Shafi.
Show Less