csi2rxHsSettle for resolution 1280 x 800 60fps

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

csi2rxHsSettle for resolution 1280 x 800 60fps

622 Views
Mc2023
Contributor IV

Hello All,

In file camera_support.c, there is a table with the following settings:

* csi2rxConfig.tHsSettle_EscClk setting for camera:
*
* Resolution | frame rate | T_HS_SETTLE
* =============================================
* 720P | 30 | 0x12
* ---------------------------------------------
* 720P | 15 | 0x17
* ---------------------------------------------
* VGA | 30 | 0x1F
* ---------------------------------------------
* VGA | 15 | 0x24
* ---------------------------------------------
* QVGA | 30 | 0x1F
* ---------------------------------------------
* QVGA | 15 | 0x24
* ---------------------------------------------
*/
static const uint32_t csi2rxHsSettle[][3] = {
{
kVIDEO_Resolution720P,
30,
0x12,
},
{
kVIDEO_Resolution720P,
15,
0x17,
},
{
kVIDEO_ResolutionVGA,
30,
0x1F,
},
{
kVIDEO_ResolutionVGA,
15,
0x24,
},
{
kVIDEO_ResolutionQVGA,
30,
0x1F,
},
{
kVIDEO_ResolutionQVGA,
15,
0x24,
},
};

Unfortunately the configuration that I am using is not in this table. I am using the following resolution 1280 x 800 60fps. Could you let me know the value of tHsSettle_EscClk in this case? Or Could you tell me how to calculate tHsSettle_EscClk for any resolution?

Remark: I am using an i.MX RT1160 Evaluation Kit 

Best regards

0 Kudos
Reply
1 Reply

588 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @Mc2023 ,

From D-PHY specification, the T-HSSETTLE should in the range of 85ns+6*UI to 145ns+10*UI, as below

jingpan_0-1689056191824.png

The UI clock points to kCLOCK_Root_Csi2_Ui in the source code. UI clock should be equal or faster than the input pixel clock. For example, if resolution is 720*1280@30Hz, so this clock should be faster than 720*1280*30 = 27.6MHz, choose 60MHz then UI should be 16.67ns. So the T-HSSETTLE should in the range of 85ns+6*16.67 to 145ns+10*16.67(185.02ns~311.7ns).

T-HSSETTLE = csi2rxConfig.tHsSettle_EscClk * (Tperiod of RxClkInEsc)

RxClkInEsc is the Escape mode Clk for RX, and should be in the range of 60~80 MHz. In the source code, RxClkInEsc points to the kCLOCK_Root_Csi2_Esc variable.
In this demo, RxClkInEsc is set as 60MHz, so (Tperiod of RxClkInEsc) is equal to 16.67ns(1/60MHz).

In order to calculate csi2rxConfig.tHsSettle_EscClk, first calculate the range of T-HSSETTLE(85ns+6*UI to 145ns+10*UI) based on the specific resolution, and choose a value within the range of T-HSSETTLE values, then calculate Tperiod of RxClkInEsc, finally calculate the result  according to the above formula.

 

Regards,

Jing

0 Kudos
Reply