FX3 UVC black screen for 400*400 RAW RGB 10 bit OV426 sensor

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

cross mob
LBence91
Level 4
Level 4
10 questions asked 50 sign-ins 25 replies posted

Hello,

I am experimented the FX3 development board and an OV7670 camera, i was able to alter the AN75779 project based on the UVC and FX3 documentation. Now i have a custom UVC board with an FX3 IC, based on the experiences with the OV7670 I made some modifications:

  1. GPIF
    1. data bus 8bit->16bit
    2. LD_ADDR_COUNT: change  to 8183
    3. LD_DATA_COUNT:  change to 8183
  2. cyfxuvcdscr.c file
    1. width and height modified to 400*400
    2. Format changed YUY2 to MJPEG
    3. Changed bit rates, fps to 30 fps
  3. uvc.c
    1. changed the I2C address for configuring the sensor
    2. Changed the pwm for generating clk for the image sensor

Now I only capturing black frames, i checked the the clock signal and read out some register values via i2c, also checked the device in wireshark, and USB device viewer. Device is enumerating as a UVC device descriptors are OK, generating the clock signal, i2c communication works well, and the wireshark says the UVC requests works well.

But I all i got is black screen. I would appreciate any kind of help, try to find out the problem about 2 weeks.

Best regards

 

0 Likes
1 Solution

Hello Bence,

I apologize for missing out one important thing in my debug.

I just went through the project once again. I found that the GPIF II Designer project was not modified based on the description given in your first interaction i:e:

  1. GPIF
    1. data bus 8bit->16bit
    2. LD_ADDR_COUNT: change  to 8183
    3. LD_DATA_COUNT:  change to 8183

To confirm if my understanding is proper or not, I checked the registers inside the file cyfxgpif2config.h. I found that the value of the register defined by the comment CY_U3P_PIB_GPIF_BUS_CONFIG is set to 0x00000003. This value is used for the configuration of the register GPIF_BUS_CONFIG. You can refer to the FX3 TRM to understand the different fields of the GPIF_BUS_CONFIG register. So, by comparing the value set with the register fields, I understood that you are still making use of an 8 bit interface and not 16 bit interface. 

Please correct me if my understanding is wrong. If my understanding is correct, then you will be sampling only 1 byte of data at each PCLK instead of 2 bytes of data that is actually required. This could be the reason for the frame size to be halved at the PC side.

Please try building the GPIF II state machine by modifying the bus width and counter limit again. After this, please include the latest header file generated in the project so that the change in the data bus width and counters are reflected in the project.

Please let me know if you have any queries on this.

Best Regards,
Jayakrishna

View solution in original post

0 Likes
47 Replies
lock attach
Attachments are accessible only for community members.

Hello Jayakrishna,

Thank you for the fast response. I attached the actual GPIF config files. yes I only got the half of the data, i am also suspicious about the GPIF parameters, but still not find the reason/solution. The header file you mentioned an obsolete one, but still can be the reason. I rebuilt the GPIF project and saved it(attached one). But i got the same results.

Best Regards,

Bence

0 Likes

Hello Bence,

Please share the latest project that is used for testing along with the Wireshark trace and UART debug logs. Please do not share any obsolete files as we want to debug using the project that is currently used for testing and not a previous version of the file.

The Wireshark traces and UART logs are for checking if the change in data bus width gave any change in the amount of data received and to see if there are any error occurred.

Best Regards,
Jayakrishna
0 Likes
lock attach
Attachments are accessible only for community members.

Hello Jayakrishna,

Sorry for the outdated file, attached the currently used one with the wireshark traces and the debug logs. Thank you for your help.

Best Regards,

Bence

0 Likes

Hello,

Still I find that the file cyfxgpif2config.h in the folder OV426_Legacy is an older copy of cyfxgpif2config.h and makes use of 8 bit data bus. The file cyfxgpif2config.h inside the location OV426_Legacy/fx3_uvc.cydsn/ is having the updated header file. Please copy the updated header file inside the project folder i.e OV426_Legacy. The project will use the header file from the location OV426_Legacy and not  from the location OV426_Legacy/fx3_uvc.cydsn/. 

Please let me know if you have any questions on this.

Please test with this modification. If you still face the same issue, then please share the updated project, UART debug logs and Wireshark trace for us to debug.

Best Regards,
Jayakrishna
0 Likes
lock attach
Attachments are accessible only for community members.

Hello,

I feel a bit ashamed about the misunderstood of the file locations, but thank you for the help, now the config file updated but i got the same results.

Is  the GPIF configuration the only part of the firmware which is responsible for sampling the data?

Best Regards,

Bence

confupdated.PNG

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Bence,

Please try testing with the attached image file. I just tried to build the same source at my end after refreshing and cleaning the project. Please try programming the device with this image and let me know if you find any difference. If you are still facing the issue, then please share the Wireshark trace and UART debug logs.

Also, can you please let me know why you have made the isDQ32bit field of the configuration structure to CyTrue as shown in the following snapshot:

JayakrishnaT_76_0-1646987311023.png

As you are using a 16 bit interface, it is not needed to configure this parameter to CyTrue.

Is  the GPIF configuration the only part of the firmware which is responsible for sampling the data?

>> Yes, the data is sampled by the GPIF II block. The configurations added in the header files generated by the tool should be enough to sample the data properly.

Best Regards,
Jayakrishna
0 Likes

Dear Jayakrishna,

I tested your image file, and also cleaned and rebuilt my project. Both of them works. I am grateful for your help. Now i can start working on the host application to show the 10 bit data.

Thank you again for your help.

Best Regards,

Bence

pics.PNG

0 Likes

Hello,

We are glad to hear that the issue is resolved. If you face any further issue while development, then please feel free to reach out to us.

Best Regards,
Jayakrishna
0 Likes