FX3 with AN75779: sensor data to FX3 and FX3 to host are OK,but video can not be preview

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

cross mob
skyma
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Dear sirs,

            I connect DVP to FX3, and use the code of AN75779. It can run without any error, but video can not be preview with any player.

           The format of DVP is bellow: 

Outpur format UYVY
PCLK 74.25M
H SYNC 22500Hz
V SYNC 30Hz
PIC-WIDTH 1650
H-active 1280
V-active 720

         FX3 print and usb traffic receive are bellow:

skyma_0-1621644993669.png

cyfxuvcdscr.c change two positions,

skyma_1-1621645260305.png

           The code of AN75779 is downloaded from:
https://china.cypress.com/documentation/application-notes/an75779-how-implement-image-sensor-interfa...

          Everything seems going well, why the video can not be preview???

          Thanks for any replay and suggestion.....

skyma_2-1621645547614.png

 

 

0 Likes
1 Solution
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

 

Have you changed the glProbeCtrl  and DMA buffer sizeas described in https://community.cypress.com/t5/Knowledge-Base-Articles/UVC-Troubleshooting-Guide-KBA226722/ta-p/25... ?

16380 is the DMA buffer size set in the firmware. Meanwhile, you need to rebuild the GPIF II project if you change the width of GPIF interface. 

 
 
 

YiZ_31_3-1621907806846.png

 

View solution in original post

0 Likes
11 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

By default, in AN75779 application note, GPIF bus width is 8 bit. Please check if this matches with the sensor interface.

Also, please check KBA226722

Regards,

Hemanth
0 Likes
skyma
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Dear Hemanth,

          Thanks for reply!

           I am very sure that the DVP output to FX3 is the format i describe before. Can you see any wrong with my DVP output?

          Here is the code, pls help to check.

          Thanks a lot!!!

0 Likes
skyma
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Dear Hemanth,

           Here is the Pic of DVP port and PCLK and H sync wareform.

skyma_0-1621754597459.png

 

skyma_1-1621754613130.pngskyma_2-1621754626590.png

 Thanks

 

0 Likes
skyma
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Dear Hemanth,

          I debug usb receives data cap from wireshark,  the packet data length is 16380 Byte. And most frame size is 116 packet(data length is 16380 Byte) +  1 packet(data length is 10008 Byte).

         So one frame size = (16380-12)*116+(10008-12)*1=1908220 Byte. 

          It seems more 65020 Byte are received.(1908220-1280*720*2=65020)

          Is't right? Why it will be?🤕

0 Likes
skyma
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Sorry.

         So one frame size = (16380-12)*116+(10008-12)*1=1908684 Byte. 

          It seems more 65020 Byte are received.(1908220-1280*720*2=65484)

0 Likes
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

 

Have you changed the glProbeCtrl  and DMA buffer sizeas described in https://community.cypress.com/t5/Knowledge-Base-Articles/UVC-Troubleshooting-Guide-KBA226722/ta-p/25... ?

16380 is the DMA buffer size set in the firmware. Meanwhile, you need to rebuild the GPIF II project if you change the width of GPIF interface. 

 
 
 

YiZ_31_3-1621907806846.png

 

0 Likes
skyma
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Dear YiZ_31,

          Thanks for reply!

          My DVP input is 8 bit data bus. I didn't change the code of AN75779(glProbeCtrl  and DMA buffer). 

          Can you give me another example code for testing?

DVP input format is below:

8 bit data bus;   (16 bit per pixel)

Outpur format UYVY
PCLK 74.25M
H SYNC 22500Hz
V SYNC 30Hz
PIC-WIDTH 1650
H-active 1280
V-active 720
0 Likes
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Yes, so you need to change the glProbeCtrl:

Make sure that maximum video frame size set in the probe control structure (glProbeCtrl) is equal to or greater than the number of bytes sent in one frame. Also, make sure that the maximum payload size set in the probe control structure is more than the size sent in the payload (which is typically the DMA buffer size).

0 Likes
skyma
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Dear YiZ_31,

          Pls do my a favor to down load the code i attached last mail.

          And the  /* Max video frame size in bytes */ in  glProbeCtrl[CY_FX_UVC_MAX_PROBE_SETTING] is  0x00, 0x48, 0x3F, 0x00. It is much greater than 1,843,200 Byte. Am i right?

skyma_0-1621913304332.png

3Q

0 Likes
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Yes, that's correct. So, there are no other place in the firmware need to be modified. Could you double check if the data amount from your FPGA is correct.

0 Likes
skyma
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Dear YiZ_31,

         Thanks for reply.

         The format of DVP is correct. As the pic bellow, the video can be preview through HMDI driver.

          Can you give me another example code, support this DVP format for testing?

3Q

skyma_3-1622019697040.png

 

skyma_0-1622019423570.png

skyma_1-1622019512598.pngskyma_2-1622019541148.png

 

 

 

0 Likes