How to comply with Output Pixel Clock.

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

cross mob
mapper
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

Hello,

 

Can someone help me with some advice?

 

I am using a sensor that has a fixed frequency to transmit the pixels, which allows changing frame rate by increase the line and frame blanking. I want to use the maximum resolution of this sensor, but I'm having problems complying with the Output Pixel Clock in the CX3 MIPI Receiver Configuration.

 

This is a normal configuration for the sensor:

mapper_3-1628837527451.png

 

mapper_2-1628837511323.png

 

The first thing that I don't understand is that the red cross says the min is 192MHz, and the box on the right says the min is 159 MHz, which is the correct one? why are there two minimum values?

 

I want to change the sensor configuration so the Output Pixel Clock is below 100MHz. I've noticed that the frame rate and the blanking influence this Clock minimum value. I tried decreasing the sensor frame rate, which can be achieved by increasing blanking.

 

The configuration below is the maximum vertical and horizontal blanking possible in the sensor, which leads to the lowest frame rate possible.

mapper_4-1628838031998.png

 

mapper_6-1628838122756.png

 

The minimum Output Pixel Clock on the right goes down significantly, but the red cross still shows a very high minimum value.

 

What else could I change to make this work? what other parameters influence this clock?

 

I appreciate any help!

 

Best regards,

Renato.

 

 

 

 

 

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

The approximate data rate for your configuration can be calculated as follows:

Data rate = 2428*1920*8*30 = 1.04Gbps

But, as the output data format is 16 bits, CX3 can either pack or pad the incoming data from the image sensor. Please refer to the following KBA to understand more on how CX3 pack or pad incoming data from the image sensor:

https://community.cypress.com/t5/Knowledge-Base-Articles/Streaming-RAW10-Format-Input-Data-to-16-24-...

Even though the KBA is written for streaming RAW10 input from image sensor, it can be referred for RAW8 input also.

Basically, if you are packing the incoming data, then the data rate will be same as that calculated before. But, if you are padding the incoming data from the image sensor, then the data sampled for each PCLK will be 16 bits. So, the data rate will be:

data rate = 2428*1920*16*30 = 2.08Gbps

As the maximum PCLK supported by CX3 is 100MHz, the data rate calculated above cannot be supported when 16 bit output is used. So, we need to pack the incoming data from the image sensor into 16 bits. 

I feel that you are using an older version of FX3 SDK. We recommend that you use FX3 SDK 1.3.4 for development as it has bug fixes for the previous releases. So, if you are not using SDK 1.3.4, then please download and install this version for development.

With FX3 SDK 1.3.4, try using the configuration attached along with this response. Please ignore the errors shown by the utility with this setting.

After creating the project with this setting, please refer to the KBA pointed before to make the modifications to pack the incoming data into 16 bits. Please let me know if you have any queries.

Best Regards,
Jayakrishna

View solution in original post

0 Likes
7 Replies
lock attach
Attachments are accessible only for community members.
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

The approximate data rate for your configuration can be calculated as follows:

Data rate = 2428*1920*8*30 = 1.04Gbps

But, as the output data format is 16 bits, CX3 can either pack or pad the incoming data from the image sensor. Please refer to the following KBA to understand more on how CX3 pack or pad incoming data from the image sensor:

https://community.cypress.com/t5/Knowledge-Base-Articles/Streaming-RAW10-Format-Input-Data-to-16-24-...

Even though the KBA is written for streaming RAW10 input from image sensor, it can be referred for RAW8 input also.

Basically, if you are packing the incoming data, then the data rate will be same as that calculated before. But, if you are padding the incoming data from the image sensor, then the data sampled for each PCLK will be 16 bits. So, the data rate will be:

data rate = 2428*1920*16*30 = 2.08Gbps

As the maximum PCLK supported by CX3 is 100MHz, the data rate calculated above cannot be supported when 16 bit output is used. So, we need to pack the incoming data from the image sensor into 16 bits. 

I feel that you are using an older version of FX3 SDK. We recommend that you use FX3 SDK 1.3.4 for development as it has bug fixes for the previous releases. So, if you are not using SDK 1.3.4, then please download and install this version for development.

With FX3 SDK 1.3.4, try using the configuration attached along with this response. Please ignore the errors shown by the utility with this setting.

After creating the project with this setting, please refer to the KBA pointed before to make the modifications to pack the incoming data into 16 bits. Please let me know if you have any queries.

Best Regards,
Jayakrishna
0 Likes

Hello Jayakrishna,

 

Thank you for the answer, it was very helpful.

 

With your configuration, the stream works with resolution 2428x1920 at 29.34 fps. The CX3 MIPI Receiver Configuration GUI shows errors in the CSI Clock and the Output Pixel Clock, so these can be ignored?

mapper_0-1628846336304.png

"data rate = 2428*1920*16*30 = 2.08Gbps

As the maximum PCLK supported by CX3 is 100MHz, the data rate calculated above cannot be supported when 16 bit output is used. So, we need to pack the incoming data from the image sensor into 16 bits. "

I understand that the pack method will not pad extra data, but could you explain why 2.08Gpbs is not supported because of the 100MHz max output pixel clock?

 

I now want to increase the resolution. I'm trying 4056x2288 at 16.2, which would lead to 4056*2288*8*16.2 = 1202704588.8, about 10% higher than the resolution I was using before, which doesn't seem very different.

 

This is the configuration:

mapper_1-1628846645937.pngmapper_2-1628846666058.png

 

When I start the stream, nothing happens. I added some logs to see MIPI errors:

mapper_3-1628846797764.png

 But no errors:

|crcErrCnt |ctlErrCnt |eidErrCnt |frmErrCnt |mdlErrCnt |recSyncErrCnt |recrErrCnt |unrSyncErrCnt |unrcErrCnt

|0 |0 |0 |0 |0 |0 |0 |0 |0

Prod = 0 Cons = 0

 

Do you have any idea what could be the issue?

 

best regards,

Renato

 

 

 

 

 

 

0 Likes

Hello Renato,

"With your configuration, the stream works with resolution 2428x1920 at 29.34 fps. The CX3 MIPI Receiver Configuration GUI shows errors in the CSI Clock and the Output Pixel Clock, so these can be ignored?"

>> We are glad to hear that you got the stream working with the configurations shared. Yes, the errors in this setting can be ignored.

"I understand that the pack method will not pad extra data, but could you explain why 2.08Gpbs is not supported because of the 100MHz max output pixel clock?"

>> When the output format is 16 bits and the maximum interface clock (PCLK) is 100MHz, the maximum possible data rate will be 1600Mbps or 1.6Gbps. When CX3 pad the incoming data into 16 bits for your resolution, the data rate is 2.08Gbps which is greater than the maximum possible data rate. this is the reason why padding of incoming data into 16 bits is not supported for this particular resolution.

Also, the configurations for the new resolution seems to be fine. Please let me know if you have followed the KBA to make the changes required for packing the incoming data from the sensor after creating the project. If this is already done, then kindly share the following for us to check:

1. Complete UART debug logs

2. I feel that the sensor is not sending any data. This is because the prod and cons counters are 0 in the debug logs shared in your previous response. Please let me know if you can probe the VSYNC, HSYNC or PCLK testpoints on CX3. If yes, then kindly probe these lines and share the traces for us to check.

3. The complete project after removing the sensor configuration settings as it is confidential.

Best Regards,
Jayakrishna
0 Likes
lock attach
Attachments are accessible only for community members.

Hi Jayakrishna,

 

Thank you, the answers were very clear.

 

1 . I'm attaching the log since the boot. Shortly after boot, I start stream using VLC, and wait for about 5 seconds before sopping execution -> this is what the log covers.

 

2. Meanwhile, I'm double-checking if the sensor is transmitting the data. I can't access VSYNC, HSYNC, or PCLK as they are not accessible in the E-Con Denebola Kit (this board has the CX3, and we are using it for development). But the sensor has similar signals, I will check those.

 

3. I'm attaching the project with the new resolution. Concerning the UVC Descriptors, I use the one generated by the New Sensor Configuration GUI with the change that I added gain control with UVC standard gain control, and the GUID is specific for RAW Bayer format, which the VLC in my Ubuntu OS can decode and show the images. There are few changes (compared to what the GUI generates) in the application as well, concerning this gain control and to enable error thread and log.

 

Thank you very much for the support.

Kind regards,

Renato

0 Likes

Hello Renato,

I saw that the changes are not made on the descriptors in the project shared as per the KBA mentioned before. Please let me know if you are using a custom VLC player that can understand the descriptors as provided in the project for streaming the video.

Also, I found that the prod and cons counts are never incremented. This means that CX3 is not receiving the data from the image sensor. Kindly check if the image sensor is sending out data or not.

Best Regards,
Jayakrishna
0 Likes

Hello Jayakrishna,

 

Thank you for the support.

 

I was able to make it work: Using the configuration you've sent (which is 8-bit input and 16-bit parallel GPIF bus with packing), resolution 4056x3040 at 10 FPS, and gated clocking (before I was using the continuous clock, and this was the reason nothing was happening). 

 

Best regards,

Renato. 

0 Likes

Hello Renato,

We are glad to hear that the issue is resolved.

Best Regards,
Jayakrishna
0 Likes