Questions about the parameter settings

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

cross mob
sherrydodo
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Hello guys!

During the process of setting the software, we encountered some difficulties in setting the parameters. The default values in MIPI CSI2 inputs are in the left red box, and we need to set the parameters in the right-hand side box and we could not see any images in the camera. Would you mind giving us some advice on how to fill the boxes?thumbnail_image.png
If anyone could help me, I will really appreciate that!
0 Likes
1 Solution

Hello Sherry,

We are glad to help you!

It seems that PRINT_FRAME_INFO macro is not enabled while capturing the UART logs. Please enable PRINT_FRAME_INFO macro and share the UART logs again

Please confirm if the Thread entry function CyCx3UvcAppThread_Entry is as follows

void
CyCx3UvcAppThread_Entry (
        uint32_t input)
{
    uint16_t wakeReason;
    uint32_t eventFlag;
    CyU3PReturnStatus_t status;
#ifdef PRINT_FRAME_INFO
    uint32_t fps;
    CyU3PMipicsiErrorCounts_t errCnts;
#endif

    /* Initialize the Debug Module */

    CyCx3UvcAppDebugInit();

    /* Initialize the UVC Application */

    CyCx3UvcAppInit();


for (;;)
    {
        eventFlag = 0;
        if(glIsConfigured){
      
        CyU3PDebugPrint(4,"\n\r Prod = %d Cons = %d \n\r ", TxCount, RxCount);
        }
       

#ifdef PRINT_FRAME_INFO
		if (Printflag == 1)
		{
			/*For video streaming application of higher FPS refrain from using this debug print or try to reduce the print information*/
			CyU3PDebugPrint(4,"\n\rProd = %d Cons = %d  Prtl_Sz = %d Frm_Cnt = %d Frm_Sz = %d B", TxCountflag, RxCountflag, PartialBufSize, FrameCount, ((TxCountflag*CX3_UVC_DATA_BUF_SIZE)+PartialBufSize));
			Printflag = 0;

			if (fpsflag == 1)
			{
				fps = 30000/(time1 -time0); //FPS calculate using time difference for 30 frames
				CyU3PDebugPrint(4,"\n\rTimeDiff = %d ms FPS = %d", (time1 -time0), fps);
				fpsflag = 0;


			}
	
#ifndef FX3_STREAMING
			CyU3PMipicsiGetErrors( CyTrue, &errCnts);

			CyU3PDebugPrint(4,"\n\r%d %d %d %d %d %d %d %d %d",errCnts.crcErrCnt,errCnts.ctlErrCnt, errCnts.eidErrCnt, errCnts.frmErrCnt, errCnts.mdlErrCnt, errCnts.recSyncErrCnt, errCnts.recrErrCnt, errCnts.unrSyncErrCnt, errCnts.unrcErrCnt );
#endif

.....
....
}

 

Regards,
Rashi

View solution in original post

0 Likes
9 Replies
lock attach
Attachments are accessible only for community members.
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please try the attached MIPI configuration and follow the steps mentioned in the KBA https://community.cypress.com/t5/Knowledge-Base-Articles/Steps-to-Setup-up-MIPI-CSI-Camera-Solution-... to generate the firmware.

From the settings, I understand that the resolution is 480 * 640 and not 640 * 480 . Is that correct?

Please enable CX3_DEBUG_ENABLED, CX3_ERROR_THREAD_ENABLE and PRINT_FRAME_INFO macro to print  the frame size details received by CX3 and errors  through UART. Please share the UART logs for us to check.

Regards,
Rashi
0 Likes

Dear Rashi

Thanks for your answer! I really appreciate that. Yes, the resolution you said is right, should be 480*640. And I will try to follow your suggestion steps to see whether I could see any images, if not, I will share UART logs for you to check.

Thank you so much for helping!

King regards,

Sherry

0 Likes

Dear Rashi

I tried to set the parameters as your suggested but I still could not see any images. So I try to share the UART logs for your team to check, please see followings:

CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
[INFO]: CyCx3UvcAppThread_Entry@../cycx3_uvc.c#1781: glDMATxCount: 13

Prod = 12 Cons = 12 Prtl_Sz = 25584 Frm_Cnt = 17 Frm_Sz = 467376 B
14 0 0 29 0 0 0 0 0
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
[INFO]: CyCx3UvcAppThread_Entry@../cycx3_uvc.c#1781: glDMATxCount: 14

Prod = 12 Cons = 12 Prtl_Sz = 26544 Frm_Cnt = 18 Frm_Sz = 468336 B
4 0 0 5 0 0 0 0 0
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
CB failure
[INFO]: CyCx3UvcAppThread_Entry@../cycx3_uvc.c#1781: glDMATxCount: 13

Prod = 12 Cons = 12 Prtl_Sz = 26544 Frm_Cnt = 19 Frm_Sz = 468336 B
5 0 0 10 0 0 0 0 0
CB failure
CB failure
CB failure
CB failure

I look forward to hearing your advice.

Best regards,

Sherry

0 Likes

Hello Sherry,

Please let me know the CX3_UVC_DATA_BUF_SIZE used in the firmware. Also, let me know which host application is used to view the video.

Is the device enumerating as USB 2.0 or USB 3.0 device?

Also, I could see some MIPI errors from the UART logs.

- As the error is crcerror and frmErrCnt , please refer to MIPI CSI2 routing guidelines in Q8 of this KBA  CX3 Hardware: Frequently Asked Questions - KBA9129... - Cypress Developer Community  

- Please let me know if the MIPI transmitter (sensor)used is MIPI CSI-2 compliant (Version 1.01, Revision 0.04 – 2nd April
2009)

Regards,
Rashi
0 Likes

Dear Rashi

I really appreciate your reply.

The host application we are using is the default camera in windows 10. I will try to check the errors from the UART logs. The CX3_UVC_DATA_BUF_SIZE we used is 0x8FD0. The device is enumerating as USB 2.0 device. For the the MIPI transmitter (sensor)used, I would say it should be MIPI CSI-2 compliant.

Best regards,

Sherry

0 Likes

Hello,

The expected frame size is 640*480*2 = 614400 bytes.

We can first try to check the reason for MIPI errors. Please let me know if you are using custom board or CX3 Denebola kit

Please add this debug print in the CyCx3UvcAppThread_Entry function of firmware and share the UART logs

for (;;)
{

CyU3PDebugPrint(4,"\n\r Prod = %d Cons = %d B", TxCountflag, RxCountflag);

... }

Regards,
Rashi
0 Likes

Dear Rashi

Thank you so much for your patience and your help. We are using custom board. We have listened to your opinion and add the debug print. I will display the codes in the following.

if (dma_reset_flag == 0)
{
CyU3PDebugPrint(4,"\n\rCB failure, glDMATxCount = %d, Prod = %d Cons = %d \r\n", glDMATxCount, TxCountflag, RxCountflag);
#ifdef CX3_ERROR_THREAD_ENABLE
#ifndef FX3_STREAMING
CyU3PMipicsiGetErrors( CyTrue, &errCnts);
CyU3PDebugPrint(4,"\n\r%d %d %d %d %d %d %d %d %d",errCnts.crcErrCnt,errCnts.ctlErrCnt, errCnts.eidErrCnt, errCnts.frmErrCnt, errCnts.mdlErrCnt, errCnts.recSyncErrCnt, errCnts.recrErrCnt, errCnts.unrSyncErrCnt, errCnts.unrcErrCnt );
#endif
#endif
}

And our UART logs are shown below:

CB failure, glDMATxCount = 0, Prod = 0 Cons = 0

0 0 0 0 0 0 0 0 0
CB failure, glDMATxCount = 7, Prod = 0 Cons = 0

0 0 0 1 0 0 0 0 0
CB failure, glDMATxCount = 8, Prod = 0 Cons = 0

0 0 0 1 0 0 0 0 0
CB failure, glDMATxCount = 0, Prod = 0 Cons = 0

0 0 0 0 0 0 0 0 0
CB failure, glDMATxCount = 8, Prod = 0 Cons = 0

0 0 0 1 0 0 0 0 0
CB failure, glDMATxCount = 0, Prod = 0 Cons = 0

0 0 0 0 0 0 0 0 0
CB failure, glDMATxCount = 8, Prod = 0 Cons = 0

0 0 0 1 0 0 0 0 0
CB failure, glDMATxCount = 0, Prod = 0 Cons = 0

0 0 0 0 0 0 0 0 0
CB failure, glDMATxCount = 8, Prod = 0 Cons = 0

0 0 0 1 0 0 0 0 0
CB failure, glDMATxCount = 0, Prod = 0 Cons = 0

0 0 0 0 0 0 0 0 0
CB failure, glDMATxCount = 8, Prod = 0 Cons = 0

0 0 0 1 0 0 0 0 0
CB failure, glDMATxCount = 0, Prod = 0 Cons = 0

0 0 0 0 0 0 0 0 0
CB failure, glDMATxCount = 7, Prod = 0 Cons = 0

0 0 0 1 0 0 0 0 0
CB failure, glDMATxCount = 0, Prod = 0 Cons = 0

Sorry to bother you so much and it is really nice of you to help me so much.

Best regards,

Sherry

0 Likes

Hello Sherry,

We are glad to help you!

It seems that PRINT_FRAME_INFO macro is not enabled while capturing the UART logs. Please enable PRINT_FRAME_INFO macro and share the UART logs again

Please confirm if the Thread entry function CyCx3UvcAppThread_Entry is as follows

void
CyCx3UvcAppThread_Entry (
        uint32_t input)
{
    uint16_t wakeReason;
    uint32_t eventFlag;
    CyU3PReturnStatus_t status;
#ifdef PRINT_FRAME_INFO
    uint32_t fps;
    CyU3PMipicsiErrorCounts_t errCnts;
#endif

    /* Initialize the Debug Module */

    CyCx3UvcAppDebugInit();

    /* Initialize the UVC Application */

    CyCx3UvcAppInit();


for (;;)
    {
        eventFlag = 0;
        if(glIsConfigured){
      
        CyU3PDebugPrint(4,"\n\r Prod = %d Cons = %d \n\r ", TxCount, RxCount);
        }
       

#ifdef PRINT_FRAME_INFO
		if (Printflag == 1)
		{
			/*For video streaming application of higher FPS refrain from using this debug print or try to reduce the print information*/
			CyU3PDebugPrint(4,"\n\rProd = %d Cons = %d  Prtl_Sz = %d Frm_Cnt = %d Frm_Sz = %d B", TxCountflag, RxCountflag, PartialBufSize, FrameCount, ((TxCountflag*CX3_UVC_DATA_BUF_SIZE)+PartialBufSize));
			Printflag = 0;

			if (fpsflag == 1)
			{
				fps = 30000/(time1 -time0); //FPS calculate using time difference for 30 frames
				CyU3PDebugPrint(4,"\n\rTimeDiff = %d ms FPS = %d", (time1 -time0), fps);
				fpsflag = 0;


			}
	
#ifndef FX3_STREAMING
			CyU3PMipicsiGetErrors( CyTrue, &errCnts);

			CyU3PDebugPrint(4,"\n\r%d %d %d %d %d %d %d %d %d",errCnts.crcErrCnt,errCnts.ctlErrCnt, errCnts.eidErrCnt, errCnts.frmErrCnt, errCnts.mdlErrCnt, errCnts.recSyncErrCnt, errCnts.recrErrCnt, errCnts.unrSyncErrCnt, errCnts.unrcErrCnt );
#endif

.....
....
}

 

Regards,
Rashi
0 Likes

Dear Rashi

Thank again for your great help!!! We tried this and adjusted some. Finally it works!!!!

It is so nice and kind of you to keep helping and answering my questions!

Enjoy your day!

Best regards,

Sherry

0 Likes