Not able to execute uvc sample code of OV_5640

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

cross mob
Anonymous
Not applicable

Hello,

I am executing sample code which is provided into the FX3 SDK on the Denebola RDK. When we connect Denebola RDK with e-Cam software then its work properly but if We connect Denebola RDK with "USB Camera App" on android device ( It's have support of UVC driver ) its not working showing black screen. What is the problem?

On serial port I just found "EnterSuspendMode Status =  0x0, Wakeup reason = 0x8" this logs.

Also I am not able to find "cyu3imagesensor.c" file. Can you please provide this file or location of this file.

Thanks,

Amit

0 Likes
1 Solution

Hi Amit,

- You could not modify the configuration file(.cycx) directly in the example project. You could create a totally new project easily with the CX3 configuration tool and fill up it with the same parameters in example project. However, the resolutions and frame rates are fixed in either our example code or the firmware which you may get from e-con system.Customers who wants to make any change need to modify both frame descriptor/probe structure and related register values in sensor.

Consequently, you won't know how to modify the configuration of OV5640 if you want to make some modifications without NDA with OmniVision. Just modify the frame descriptor and probe structure doesn't make sense.

-CX3 indeed supports full speed. We also provide the configuration descriptor for full speed. In the if... else branch we also handle this case in the last else.

CyCx3AppGetProbeControlData (

        CyU3PUSBSpeed_t usbConType,

        uint8_t         frameIndex

        )

{

    if (usbConType == CY_U3P_SUPER_SPEED)

    {

        if (frameIndex == 1)

        {

        /* 1920 x 1080 @30 fps */

            return ((uint8_t *) gl1080pProbeCtrl);

        }

        else if (frameIndex == 2)

        {

        /* 2952 x 1944 @15 fps */

            return ((uint8_t *)gl5MpProbeCtrl);

        }

        else if (frameIndex == 3)

        {

        /* 1280 x 720 @60 fps */

            return ((uint8_t *) gl720pProbeCtrl);

        }       

        else if (frameIndex == 4)

        {

            /* 640 x 480 @30 fps */

            return ((uint8_t *)glVga30ProbeCtrl);

        } 

    }

    else if (usbConType == CY_U3P_HIGH_SPEED)

    {

        if (frameIndex == 1)

        {

            /* 640 x 480 @30 fps */

            return ((uint8_t *)glVga30ProbeCtrl_HS);

        }       

        else if (frameIndex == 2)

        {

            /* 640 x 480 @60 fps */

            return ((uint8_t *)glVga60ProbeCtrl);

        }

    }

    else

    {

        if (frameIndex == 1)

        {

            /* 640 x 480 @5 fps */

            return ((uint8_t *)glVga30ProbeCtrl);

        }

    }

    return NULL;

}

As you could see that the firmware will return Vga30 structure when CX3 connects to host in full speed.

However, it should be impossible for you to find a host which provides full speed USB port. Nowdays, alomst all USB ports are USB2.0 and above.

In this case, CX3 will always works in USB2.0 or USB3.0(USB3.1, Gen1) and never USB1.0/1.1 by default.

View solution in original post

0 Likes
11 Replies
YangyangC_06
Employee
Employee
750 replies posted 500 replies posted 250 replies posted

Hi Amit,

For the question No.1, can you please try with another Android UVC app?

For the question No.2, we could not provide the source code of OV5640 configuration file since it is confidential information. Please sign NDA with OmniVision and you could get the corresponding configuraiton files.

0 Likes
Anonymous
Not applicable

Can you please suggest any android app. Because we also tried with came wifi app but facing same issue.

0 Likes

It's very easy to get numerous examples from google. I search it for you and get an example on Github.

https://github.com/jiangdongguo/AndroidUSBCamera

0 Likes
Anonymous
Not applicable

Hello,

I tested with this app but we didn't saw any video. Is their any particular function output which we have to test. We just saw weak up message on debug log.

Thanks,

Amit

0 Likes
Anonymous
Not applicable

As per the suggestion from Cypress we purchase https://robokits.co.in/programmers/arm/j-link-usb-arm7-arm9-arm11-cortex-m3-debugger?gclid=CjwKCAjwp...  this debugger. But we are not able to debugge video application through this debugger. Is it problem related to speed.

0 Likes

Hi Amit,

I recommend you to capture the log information from UART port. It is more easy and convient than using J-tag.

As I have said, please check if the sensor outputs the signals as expected after you run Android app.

Measure CSI clock+/-, D0-/+, D1-/+, D2+/- and D3-/+, upload the screenshots of oscilloscope.

0 Likes
Anonymous
Not applicable

I have a simple doubt, as cypress mention ov5640 sample code which is provided into the FX ask 1.3.3 are working on eCam app which is provided by econ system for desktop. Then it should be work as it is on Android app "Webeecam" which is provided by econ system only. My basic questions is, This firmware should be work on any android app who's support UVC. Why this is not working. Is there any dependacy in Android app side which is created by Econ or Cypress. Or is there any changes required in firmware?

0 Likes
Keerthy_V
Moderator
Moderator
Moderator
First like given 250 sign-ins 50 solutions authored

Hi,

Can you please try the OV5640 example project that is available with FX3 SDK 1.3.4? We have done minor modification with respect to SET_INTERFACE handling. This may fix the streaming issues in linux and android.

0 Likes
Anonymous
Not applicable

I observe, in case of desktop based app this sample code set at VGA 60 fps. But in case of Android app 60 fps not supported. I tried to change the fps through .cycx file but it's not able to change. Can you tell me how to change this frame rate? Or is there any other issue which can solve this problem.

0 Likes
Anonymous
Not applicable

As per the CX3 datasheet it's capable for high speed, super speed and full speed. But your provided source code are not supporting to full speed. Also I tried to generate a new code but it's not working, it's just compile successfully. So, Can you please tell me how to add the support of full speed with 30fps in your sample code.

0 Likes

Hi Amit,

- You could not modify the configuration file(.cycx) directly in the example project. You could create a totally new project easily with the CX3 configuration tool and fill up it with the same parameters in example project. However, the resolutions and frame rates are fixed in either our example code or the firmware which you may get from e-con system.Customers who wants to make any change need to modify both frame descriptor/probe structure and related register values in sensor.

Consequently, you won't know how to modify the configuration of OV5640 if you want to make some modifications without NDA with OmniVision. Just modify the frame descriptor and probe structure doesn't make sense.

-CX3 indeed supports full speed. We also provide the configuration descriptor for full speed. In the if... else branch we also handle this case in the last else.

CyCx3AppGetProbeControlData (

        CyU3PUSBSpeed_t usbConType,

        uint8_t         frameIndex

        )

{

    if (usbConType == CY_U3P_SUPER_SPEED)

    {

        if (frameIndex == 1)

        {

        /* 1920 x 1080 @30 fps */

            return ((uint8_t *) gl1080pProbeCtrl);

        }

        else if (frameIndex == 2)

        {

        /* 2952 x 1944 @15 fps */

            return ((uint8_t *)gl5MpProbeCtrl);

        }

        else if (frameIndex == 3)

        {

        /* 1280 x 720 @60 fps */

            return ((uint8_t *) gl720pProbeCtrl);

        }       

        else if (frameIndex == 4)

        {

            /* 640 x 480 @30 fps */

            return ((uint8_t *)glVga30ProbeCtrl);

        } 

    }

    else if (usbConType == CY_U3P_HIGH_SPEED)

    {

        if (frameIndex == 1)

        {

            /* 640 x 480 @30 fps */

            return ((uint8_t *)glVga30ProbeCtrl_HS);

        }       

        else if (frameIndex == 2)

        {

            /* 640 x 480 @60 fps */

            return ((uint8_t *)glVga60ProbeCtrl);

        }

    }

    else

    {

        if (frameIndex == 1)

        {

            /* 640 x 480 @5 fps */

            return ((uint8_t *)glVga30ProbeCtrl);

        }

    }

    return NULL;

}

As you could see that the firmware will return Vga30 structure when CX3 connects to host in full speed.

However, it should be impossible for you to find a host which provides full speed USB port. Nowdays, alomst all USB ports are USB2.0 and above.

In this case, CX3 will always works in USB2.0 or USB3.0(USB3.1, Gen1) and never USB1.0/1.1 by default.

0 Likes