Announcements

Industry-first USB 10Gbps device controller. Check it out now!

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

cross mob
lock attach
Attachments are accessible only for community members.
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

Hi I'm trying getting video image through CX3 MIPI.

I'm using e-con denebola RDK.

And I can get a video data from camera but it's not what I expected.

Some parts of image are fine but others are not.

My firmware is custom firmware based on bulksrcsink because I don't use this device as an UVC descriptor.

Also I used pre-defined CX3 configuration for ov5640 image sensor so I didn't change any value.

PC program that I checked image is my company's custom program.

I attached c code and some images.

How can I solve this problem?

 

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

I tried to optimize your code, however, there is data loss happening randomly. Try modifying the host application to receive the data at a faster rate.

Please find the attached firmware project folder. Please use the SDK 1.3.4 for building the firmware projects.

Best Regards,
AliAsgar

View solution in original post

0 Likes
21 Replies
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

The configuration looks fine. From what I see in the image, I think there seems to be loss of data.

Could you check with wireshark traces if every video frame has the same number of bytes?
Also please share the UART debug logs.

Is the device bound to cyusb3.sys driver?

Does the issue occurrence depend on activity on the other USB endpoints?

Best Regards,
AliAsgar

 

 

0 Likes
lock attach
Attachments are accessible only for community members.
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

I checked every frame has the same number of bytes.

Unfortunately, I don't have a cable for UART so I couldn't get the debug logs.

And it's not bound cyusb3.cyc driver, it's using my company's driver.

I didn't checked it on other USB endpoints.

But during the test I found some curious thing.

I attached 2 images. One is captured on USB3.0, another is captured on USB2.0.

Images are slightly different, is it related problem?

The frame size is 720x1280 on program and it can be modified with any size.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

I suspect a data loss issue.
Could you send a custom frame with incrementing values for every pixel?

1st pixel - 0x00, 2nd pixel - 0x01, 3rd pixel - 0x02 and so on.
Please trace the USB lines using Wireshark during this test and share with me the trace.

Best Regards,
AliAsgar

0 Likes
lock attach
Attachments are accessible only for community members.
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

Hi,

I attached some frame images and packet data.

I used another packet monitoring program not Wireshark though.

I checked image and packet data, it was different a lot.

I agree with your opinion that has data loss.

But I don't know exact reason for this.

What about your thoughts?

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Are the register settings for the OV5640 sensor being taken from the library provided with the FX3 SDK, or did you get the registers settings from the vendor and manually setting it in the firmware?

Could you please share the firmware project folder as well as your host utility to us to try to reproduce the issue at our end?

Best Regards,
AliAsgar

0 Likes
lock attach
Attachments are accessible only for community members.
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

Hi,

The registers are set by library from FX3 SDK.

And I attached host program and firmware.

If you have any ideas or questions, please let me know.

Thanks.

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Could you also share your company's driver for binding the device?

Best Regards,
AliAsgar

0 Likes
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

Hi,

The driver is in the folder with program.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

I had tried with the driver in the folder, but below is the error I faced, there is no AMD64 folder in the host_program folder you sent.

AliAsgar_0-1678856995030.png

 

Best Regards,
AliAsgar

 

0 Likes
lock attach
Attachments are accessible only for community members.
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

sorry, I attached driver again.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

I was successfully able to bind the device to the driver. It enumerated as a Biometric device with the name "integrated biometrics fingerprint scanner".

However, no product came up in the host application when I opened the application. Not sure how to view the video stream from the host application. Could you let me know if I am missing any step, or how to solve this issue?

Best Regards,
AliAsgar

0 Likes
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

Hi,

When you open the program, there will be a product list like below if the device is connected to PC.

MJ_1-1678885297359.png

And if you click the "Start Capture" button, video stream would start.

Thanks.

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

I am not able to see any product listed

AliAsgar_0-1678943562383.png

Best Regards,
AliAsgar

 

0 Likes
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

Hi,

you are using denebola RDK right?

If this problem happen again and again, please connect the USB hub between PC and device.

Thanks.

0 Likes
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

or may be it would be because of CyU3PUsbLPMDisable() function.

I removed CyU3PUsbLPMDisable in the CY_U3P_USB_EVENT_SETCONF.

I guess that's the reason.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

I found one issue in the GPIF callback. With FX3 SDK 1.3.4, we use GpifControlSwitch to switch socket and not call gpifsmswitch API. Now I able to see video (color bar) but with discrepancy at the bottom. I am trying to find the cause of the remaining issue. I am working on it. I will keep you updated.

AliAsgar_0-1679303075358.png

Best Regards,
AliAsgar

 

0 Likes
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

Hi, thanks for your work!

Is discrepancy random? Or does it always appear at the bottom?

Anyway it helped a lot.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Most of the time it appears at the bottom.

But sometimes I see there is data loss happening.

I am investigating the issue. I will let you know If I have updates.

Best Regards,
AliAsgar

0 Likes
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

Hi,

I was wondering if there is any update.

And please share the code and library.

I found that there is no function, which is GpifControlSwitch in my SDK library.

Or should I remove it and install the SDK again?

0 Likes
lock attach
Attachments are accessible only for community members.
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

I tried to optimize your code, however, there is data loss happening randomly. Try modifying the host application to receive the data at a faster rate.

Please find the attached firmware project folder. Please use the SDK 1.3.4 for building the firmware projects.

Best Regards,
AliAsgar

0 Likes
MJ
Level 3
Level 3
25 sign-ins 10 replies posted 5 questions asked

Hi, Thank you for your work

I'll try modifying host program.

0 Likes