cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

liuzq
New Contributor II

cypress专家你好:

https://community.cypress.com/t5/Knowledge-Base-Articles/UVC-Firmware-for-FX3-FPGA-Industrial-Camera...

这个FX3固件是把FX3的SPI flash中的bit文件下载到lattice FPGA运行,FX3 GPIF口是被配置成FPGA的slave fifo的,同时FX3在上位机上被枚举成一个UVC标准设备,怎样将它改到Xilinx zynq开发板上运行,并且FPGA的bit文件不用放在FX3的SPI器件中,直接存放在FPGA开发板上?谢谢

0 Likes
8 Replies
YiZ_31
Moderator
Moderator

Hi,

 

这个lattice的参考设计是一个标准设计,FPGA的源代码暂未开放,如有需求您可以联系lattice那边试试。如果您想使用自己的FPGA,还是建议参考https://www.cypress.com/documentation/application-notes/an65974-designing-ez-usb-fx3-slave-fifo-interface

 

Regards,
Eddie

0 Likes
liuzq
New Contributor II

已经将AN65974从xilinx spartan6移植到了xilinz zynq7020上了,怎样进一步将UVC加到AN65974的FX3固件程序中,使它被windows认作是个"照相机"?另外,怎样取得FX3从图像设备(CMOS sensor或FPGA)接收到的一帧图像数据的安放RAM的“指针 ”并给其加上UVC Header?谢

0 Likes
YiZ_31
Moderator
Moderator

使其被windows识别为摄像头只需要修改描述符文件

添加UVC header需要在DMA callback中完成

以上两点请参考AN70707

0 Likes
liuzq
New Contributor II

FX3 slave fifo sync 固件初始化时,

static void
CyFxUvcAppGpifInit (
void)
{
CyU3PReturnStatus_t apiRetStatus;

CyU3PDebugPrint (4, "CyFxUvcAppGpifInit...\r\n");

/* Load the GPIF configuration for Slave FIFO sync mode. */
apiRetStatus = CyU3PGpifLoad (&CyFxGpifConfig);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PGpifLoad failed, Error Code = %d\n",apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
}

#if (CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT == 0)
CyU3PGpifSocketConfigure (0,CY_U3P_PIB_SOCKET_0,3,CyFalse,1);

CyU3PGpifSocketConfigure (3,CY_U3P_PIB_SOCKET_3,3,CyFalse,1);
#else if #if (CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT == 1)
CyU3PGpifSocketConfigure (0,CY_U3P_PIB_SOCKET_0,3,CyFalse,1);

CyU3PGpifSocketConfigure (3,CY_U3P_PIB_SOCKET_3,3,CyFalse,1);
#endif

/* Start the state machine. */
apiRetStatus = CyU3PGpifSMStart (RESET,ALPHA_RESET);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PGpifSMStart failed, Error Code = %d\n",apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
}

}

这个函数初始化Slave Fifo Sync GPIF;

apiRetStatus = CyU3PDmaChannelCreate (&glChHandleSlFifoPtoU,
CY_U3P_DMA_TYPE_MANUAL, &dmaCfg);

这个函数创建一个DMA缓冲区;

 

那么创建的这个DMA缓存是如何和GPIF关联起来的?

另外,U2P和P2U 分别指什么(是什么的缩写)?

谢谢

 

0 Likes
YiZ_31
Moderator
Moderator

你在初始化DMA通道的时候需要填写socket

U2P就是UIB (USB Interface Block)  to PIB (Processor Interface Block)  P2U就是PIB to UIB

 

0 Likes
liuzq
New Contributor II

CYUSB3KIT-003运行https://community.cypress.com/t5/USB-Superspeed-Peripherals/FX3-slave-FIFO-to-UVC/m-p/44377这个帖子里cypress专家提供的attachment  UVC_SLaveFifo_Header.zip,但debug uart里显示:

liuzq_0-1619010538265.png

 

查看源代码uvc.c:

liuzq_2-1619010666680.png

这是表示USB中断了么,什么原因造成的?谢谢

 

 

0 Likes
liuzq
New Contributor II

liuzq_2-1618843005570.png

liuzq_3-1618843116577.png

 

 

 

Cyusb3Kit-003的debug uart打印出这些信息是发生了啥错误?谢谢

 

0 Likes
YiZ_31
Moderator
Moderator

你这就没有任何数据进来,frame size为0

0 Likes