How to avoid the CRC calculation in CX3

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

cross mob
ArSa_3842301
Level 3
Level 3
25 sign-ins 10 replies posted 10 questions asked

Hi,

I am having problems getting frames from an image sensor using CX3 device.I have set the CX3 with a PLL configuration, in order to run with the highest baud rate possible, 2.4Gbps,setting the PCLK in 100MHz.

In the other part, I have configured the PLL of CIS (CMOS Image Sensor) acording the CX3'baud rate.

The performance is correct and I can show the frame from the CIS throught a own application developed in my laptop. But sometimes a have a frozen frame. Making a debug I have realized wich CX3 is not sending the same frame size, since sometimes send less rows in particular frames, and it makes that the frozen frame apperas.

Arrived to this point, I have two possible causes of this problem:

taking a look in CMOS image sensor datahseet I have seen that it send a crc code for each line. For this reason If Sensor has a proble and send a bad frame, it will produce a bad crc calculated in CX3 and the frozen frame in last step. So, my question is: It is possible to avoid the crc calculation, for each row received from the CIS, in CX3?

Secondly, It is possible that we are having problems with the sincronism between Image sensor an CX3, for this reason, I have tried to reduce the frame rate from the Image sensor, wrowing up both vertical blanking and horizontal blanking and holding the baud rate in CX3. In this case the performance is correct and it does not show any frame trouble. But I have reduce the total frame rate and it is a cost which cannot assume.

could you give me some advice about it?

Thanks.

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please refer to this KBA  MIPI-CSI Protocol and Physical Layer Errors in CX3... - Cypress Developer Community   for the errors that are counted by CX3's MIPI block.

Because in these case, if I can disable the crc calculation in CX3, maybe I will not have the current problem.

>> Please check if MIPI errors are seen when the frozen frame problem is seen. You can call CyU3PMipicsiGetErrors API in AppThread_Entry to check MIPI errors continuously.

About this I have not the error code 71, moreover I usually detect the frozen frame when I have different frame size value than the original. And this bad frame size is always less than the original, one or twice row smaller.

>> Please let me know if you meant that the problem is seen when the frame size is not as expected or when sensor ( MIPI transmitter) sends different frame size then expected. If yes, in that case the problem is expected as the UVC host application will expect the frame size as mentioned in the UVC probe control structure. It is expected that the frame size remains constant.

 

Regards,
Rashi

View solution in original post

0 Likes
3 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

To understand the cause of the frozen frame, please share the UART debug prints while streaming video.

#1 for the CRC thing - Please let me know how will the CRC be sent

#2 I have tried to reduce the frame rate from the Image sensor, wrowing up both vertical blanking and horizontal blanking and holding the baud rate in CX3. In this case the performance is correct and it does not show any frame trouble. But I have reduce the total frame rate and it is a cost which cannot assume

>> From this it seems there is some problem related to video bandwidth. Please share the CX3 MIPI Receiver configuration tool settings and the UART debug prints. Please check if CyU3PDmaMultiChannelCommitBuffer fails with error code 71 for the non working case (frame rate not reduced)

Regards,
Rashi
0 Likes

Hi Rashi,

about the CRC, maybe i have not drive correctly the question. I would like to know if CX3 is calculating the CRC for each line and compare the result with the CRC value wich comes from Sensor. And the most important, what happens if these values are not equals? This current frame is discarded in CX3?.

Because in these case, if I can disable the crc calculation in CX3, maybe I will not have the current problem.

>> From this it seems there is some problem related to video bandwidth. Please share the CX3 MIPI Receiver configuration tool settings and the UART debug prints. Please check if CyU3PDmaMultiChannelCommitBuffer fails with error code 71 for the non working case (frame rate not reduced)

About this I have not the error code 71, moreover I usually detect the frozen frame when I have different frame size value than the original. And this bad frame size is always less than the original, one or twice row smaller.

Regards.

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please refer to this KBA  MIPI-CSI Protocol and Physical Layer Errors in CX3... - Cypress Developer Community   for the errors that are counted by CX3's MIPI block.

Because in these case, if I can disable the crc calculation in CX3, maybe I will not have the current problem.

>> Please check if MIPI errors are seen when the frozen frame problem is seen. You can call CyU3PMipicsiGetErrors API in AppThread_Entry to check MIPI errors continuously.

About this I have not the error code 71, moreover I usually detect the frozen frame when I have different frame size value than the original. And this bad frame size is always less than the original, one or twice row smaller.

>> Please let me know if you meant that the problem is seen when the frame size is not as expected or when sensor ( MIPI transmitter) sends different frame size then expected. If yes, in that case the problem is expected as the UVC host application will expect the frame size as mentioned in the UVC probe control structure. It is expected that the frame size remains constant.

 

Regards,
Rashi
0 Likes