Using FX3 for industrial imaging applications

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MoAb_1070241
Level 1
Level 1

I would like assistance with the following questions:

1) Changing the GPIF bus width at run-time : Consider an application where the image sensor produces 12-bit data. We may want to capture all 12 bits of image data, or just the most-significant 8 bits, depending on the user selection at run-time. This calls for the firmware to change its behavior (at run-time). I did a little digging myself and came across some material that other developers had put up for achieving the same result. Basically, they had suggested the following steps:

CyU3PUsbAckSetup();

CyU3PGpifDisable(1);

CyFxGpifRegValue[1] = 0x00000003; //          8-bit or use CyFxGpifRegValue[1]=0x00000067; for 16 bit

retstatus = CyU3PGpifLoad(&CyFxGpifCon  g);

if(retstatus != CY_U3P_SUCCESS)

CyU3PDebugPrint(1,"\r\n gpi  oad failed error %x \r\n",retstatus);

retstatus = CyU3PGpifSMStart(0,0);

if(retstatus != 0)

CyU3PDebugPrint(1,"\r\n gpifsmstart failed error %x \r\n",retstatus);

Is the sequence suggested above correct?

2) Getting FX3 to work with non-UVC platforms, preferable a fully-pledged USB3 Vision standard : I have seen some scattered material in the community posts, but there needs to be an official Application Note, or better still a fully-working template that can be customized to different sensors. The market and technical need for such Application Note exists already.

3) Modifying the example that comes with the Application Note AN75779 to make a new application is problematic : Based on my experience, renaming the application breaks the tool-chain. A work-around is to have multiple copies of the same application in different Work Spaces, and name each Work Space to reflect the image sensor being used. This is not acceptable in an industrial/business environment. The ideal solution is to have a new template for imaging application. This allows people to create a new project (with a unique name) which makes the management of projects much easier.

Thanks in advance,

Mo

0 Likes
1 Reply
ManaskantD_51
Employee
Employee
Welcome! 25 solutions authored 10 solutions authored

The sequence suggested above is correct. But I would also recommend you to reset the DMA channel before restarting the GPIF state machine.

CyU3PUsbAckSetup();

CyU3PGpifDisable(1);

CyU3PDmaChannelReset(&chHandle);

CyFxGpifRegValue[1] = 0x00000003; //          8-bit or use CyFxGpifRegValue[1]=0x00000067; for 16 bit

retstatus = CyU3PGpifLoad(&CyFxGpifCon  g);

if(retstatus != CY_U3P_SUCCESS)

CyU3PDebugPrint(1,"\r\n gpi  oad failed error %x \r\n",retstatus);

CyU3PDmaChannelSetXfer(&chHandle, 0);

retstatus = CyU3PGpifSMStart(0,0);

if(retstatus != 0)

CyU3PDebugPrint(1,"\r\n gpifsmstart failed error %x \r\n",retstatus);

0 Likes