I want to change the firmware provided in AN75779.zip to meet the requirement of my own sensor with the following features:
1. 16-bit synchronous parallel data interface
2. 16 bits per pixel
3. YUY2 color space
4. 1024 * 768 pixel resolution
5. 30 frames per second
6. Active high frame/line valid signals
7. Positive clock edge polarity
Most of those features are same as the sensor used in AN75779,except 1 and 4, width of the data interface and resolution.
For 16-bit synchronous parallel data interface, I go to the Interface Definition tab in GPIF II Designer and choose the 16 Bit option for Data Bus Width, then i go to the state machine tab, change the counter limit value of LD_DATA_COUNT and LD_ADDR_COUNT to 8183.Finally, i update the cyfxgpif2config.h in original firmware project,and make sure the iomatrix configuration in the firmware has the isDQ32Bit parameter set to CyFalse.
For 1024 * 768 pixel resolution, I change the related content of descriptors as follow,
/* Class specific Uncompressed VS format descriptor */
0x04, /* X dimension of the picture aspect ratio; Non-interlaced */
0x03, /* Y dimension of the pictuer aspect ratio: Non-interlaced */
/* Class specific Uncompressed VS frame descriptor */
0x00, 0x04, /* Width in pixel */
0x00, 0x03, /* Height in pixel */
The remain part of the firmware is unchanged.
My sensor is not configured through FX3, but i am sure it could run in the expected mode described above.After all, I build the firmware project and download the .img file into FX3 and preview real-time video use software like AMCap/VirtualDub, the system could work, show clear image with the set resolution, but it just streams near 15 frames per second, and even worse is that, the frame rate drops to 0 fps after a few seconds, the video is getting stuck.The video could be recovered by restarting the software,but then it stucks again after a few seconds.
I need help.Thanks!