CX3 UART Debug

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

cross mob
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hello,

I created a new CX3 UVC project, I modified the imagesensor.c file and added CDC interface for UART debugging in the project.

My problem is that after downloading the configured .img file to the hardware, I can open the camera software and drive the camera normally but there is no image.

My UART log is as follows

yaqi_4776616_0-1620977854110.png

I enabled CX3_DEBUG_ENABLED and SENSOR_DEBUG, the only result printed is the above and the register configuration.The following information that I want to observe is not in the UART log.

yaqi_4776616_1-1620978071899.png

I would like to know what should I do next for debugging,hope someone can help me, thanks a lot!

Best Regards,

Yaqi

0 Likes
1 Solution
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi,

The prints that you have mentioned will appear only if CX3 receives a complete frame. This is because the variable PrintFlag will be set only when CX3 receive one complete frame. Please check if the call to the function CyCx3UvcAppImageSensorSetVideoResolution () is commented out inside the function CyCx3UvcAppHandleSetCurReq (). If it is commented out, then please uncomment this function. Also, check if this function is called when the camera software is started by adding debugprints inside the function definition.

Best Regards,
Jayakrishna

View solution in original post

0 Likes
6 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi,

The prints that you have mentioned will appear only if CX3 receives a complete frame. This is because the variable PrintFlag will be set only when CX3 receive one complete frame. Please check if the call to the function CyCx3UvcAppImageSensorSetVideoResolution () is commented out inside the function CyCx3UvcAppHandleSetCurReq (). If it is commented out, then please uncomment this function. Also, check if this function is called when the camera software is started by adding debugprints inside the function definition.

Best Regards,
Jayakrishna
0 Likes

Hi Jayakrishna,

Also, check if this function is called when the camera software is started by adding debugprints inside the function definition.

I want to know if there is any impact if you ask me to check if this function is called or not

yaqi_4776616_0-1621586954352.pngyaqi_4776616_1-1621586973775.png

Best Regards,

Yaqi

 

 

0 Likes

Hello Yaqi,

The function CyCx3UvcAppImageSensorSetVideoResolution () internally calls another function to configure the image sensor. I wanted to check if the function CyCx3UvcAppImageSensorSetVideoResolution () is called properly so that the sensor is configured. If the function CyCx3UvcAppImageSensorSetVideoResolution  () is called, then based on the code, the sensor will be configured. But as the PrintFlag is not set, CX3 is not receiving a complete frame. So, we suspect that the sensor might not be sending data properly. 

Best Regards,
Jayakrishna
0 Likes
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hi Jayakrishna,

I did not configure the registers in CyCx3_ImageSensor_Set_Resolution0 () called by CyCx3UvcAppImageSensorSetVideoResolution (), but in CyCx3UvcAppStart () called by
CyCx3_ImageSensor_Wakeup(). Will this have any effect?

Best Regards,

Yaqi

0 Likes
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi,

The standard procedure is that when the host issues a COMMIT:Set_CUR request, we will configure the MIPI Block of CX3 and image sensor with the appropriate settings. This is done by the function CyCx3UvcAppImageSensorSetVideoResolution (). Please look into the the definition of this function. You will find that there will be switch cases for configuring the MIPI Block of CX3 and configuring image sensor. We recommend you to use this standard procedure for configuring the sensor. 

Best Regards,
Jayakrishna
0 Likes
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hi Jayakrishna, 

I will use CyCx3UvcAppImageSensorSetVideoResolution () to configure the sensor, thanks for your help good luck!

Best Regards,

Yaqi

 

0 Likes