[iMX8M Plus]How to obtain precise MCLK clock ?

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

[iMX8M Plus]How to obtain precise MCLK clock ?

738 Views
khang_letruong
Senior Contributor III

Dear Community,

I am trying to configure the MCLK clock (which is input of a MIPI-CSI2 camera sensor) to achieve 37.125MHz. What I am doing is re-parenting the it as below :

                clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                clock-names = "mclk";
                assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_200M>;
                assigned-clock-rates = <37125000>;
                clock-frequency = <37125000>;
                mipi_csi;
                csi_id = <0>;


                mclk = <37125000>;
                mclk_source = <0>;

However, I only receive ~39.99MHz instead of ~37MHz :

MCLK_37MHz.jpg

Could someone tell me how to obtain the nearest value of to the expected frequency ?

Thanks in advance and best regards,
Khang

 

 

 

 

0 Kudos
Reply
2 Replies

703 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @khang_letruong,

I am exploring the issue, and below are the details required for further analysis to debug this issue,

  • Could you please measure the frequency manually with the cursor and provide me with the waveforms? This is to make sure that the measured value matches the manual measurement.
  • Since the 24MHz external crystal is the root clock for PLL clocks, could you please check the waveform for the 24MHz external crystal?

 

Thank you.
Best Regards,
Dhruvit.

0 Kudos
Reply

735 Views
khang_letruong
Senior Contributor III

Meanwhile, for the expected 74.25Mhz, I only receive 66.66MHz as below :

                clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                clock-names = "mclk";
                assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_200M>;
                assigned-clock-rates = <74250000>;
                clock-frequency = <74250000>;
                mipi_csi;
                csi_id = <0>;

                mclk = <74250000>;
                mclk_source = <0>;

 

MCLK_74MHz.jpg

 

Regards,

Khang

0 Kudos
Reply