the clock output is not correct in HSRUN mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

the clock output is not correct in HSRUN mode

跳至解决方案
5,699 次查看
RehabSoliman
Contributor I

Hello all 

I am using s32k142 EVB and configure the clock to run in HSRUN mode and I want to be sure that the clock output is correct but I found that It is not correct. I am using the internal oscillator not the external.

if the s32k142 doesn't have external oscillator on the board?

If I use wrong test please tell me the correct test to be sure that:

  • configure the HSRUN mode with :
    • SPLL = 112 MHz
    • Core & System clocks  = 112 MHz (their input must be the SPPL)
    • Bus clock = 56 MHz

and I will attach the code to test the clock please help me in this issue     

0 项奖励
回复
1 解答
5,647 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

I don't think it's wrong. The output 112MHz signal may be too high frequency. In addition, the oscilloscope bandwidth of 350MHz may be too low.

在原帖中查看解决方案

0 项奖励
回复
14 回复数
5,687 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi RehabSoliman,

I am using s32k142 EVB and configure the clock to run in HSRUN mode and I want to be sure that the clock output is correct but I found that It is not correct.

The method of flipping IO is imprecise. SCG_CLKOUTCNFG[CLKOUTSEL] and SCG_CLKOUTCNFG[CLKOUTSEL] can output clock on the CLKOUT pin.(Do not forget select the CLKOUT in pins tool) 

Figure 27-1. Clocking diagram.png

SCG_CLKOUTCNFG[CLKOUTSEL] SPLL_CLK.png

 

I am using the internal oscillator not the external.

But the clock_configuration.png shows that you select external 8MHz crystal as input of SPLL_VCO.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
5,684 次查看
RehabSoliman
Contributor I

Thanks for your reply 

but I mean I want to be sure that the frequency is 112MHz so I need a way to test this part.

 I want to Check system clock speed (main clock speed) is 112MHz

 

is the s32k142EVB has external oscillator on the board?

 

0 项奖励
回复
5,680 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Did you output the clock by refer SCG_CLKOUTCNFG[CLKOUTSEL] SPLL_CLK.png? What is the frequency measured by the oscilloscope on the CLKOUT pin?

S32k142EVB has external 8MHz crystal on the board, just like the project configured.

0 项奖励
回复
5,678 次查看
RehabSoliman
Contributor I

the clock out is 112MHz

but I want to be sure that the core clock and system clock is 112MHz

 

0 项奖励
回复
5,675 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Did you tried to select HCLK output CORE_CLK?

0 项奖励
回复
5,671 次查看
RehabSoliman
Contributor I

No, I didn't because I don't know how to this 

could you tell me the steps and I will try to do ?

 

0 项奖励
回复
5,665 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

This way you can output SPLL_CLK at CLKOUT pin. SCG_CLKOUTCNFG[CLKOUTSEL] SPLL_CLK.png

 

the clock out is 112MHz
I am not sure if you achieve it(output SPLL_CLK at CLKOUT pin). Did you select which pin as CLKOUT? Are you able to measure the frequency by using oscilloscope?)

select CLKOUT pin.png

 

The method is the same, edit settings of SIM_CLKOUTSEL and select HCLK.

edit settings of SIM_CLKOUTSEL.png

0 项奖励
回复
5,662 次查看
RehabSoliman
Contributor I

I did this test and the spll is 112MHZ but I want to be sure that the core clock has 112MHz not 48MHz 

could you help me in this part?

0 项奖励
回复
5,659 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

I did not configure the Core to 112 MHz in last reply, so even if I choose CLKOUT that image shows 48MHz. I'm not sure if you have modified the core frequency to 112MHz, what is the frequency of CLKOUT output by the oscilloscope now?

In below image, you can see the core clock is configure to 112MHz and the CLKOUT(HCLK selected) will be 112MHz. I am not sure if you notice the note1 in Figure 27-1. Clocking diagram: 1. The source of HCLK (to Arm® Cortex® modules) is CORE_CLK.

HSRUN Core clock 112MHz.png

0 项奖励
回复
5,653 次查看
RehabSoliman
Contributor I

Hello 

I get it finally but it sine wave not square wave is it wrong ?

0 项奖励
回复
5,648 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

I don't think it's wrong. The output 112MHz signal may be too high frequency. In addition, the oscilloscope bandwidth of 350MHz may be too low.

0 项奖励
回复
5,642 次查看
RehabSoliman
Contributor I

thanks for your support

0 项奖励
回复
5,655 次查看
RehabSoliman
Contributor I

the output = 40.98360655737705 MHz 

it is not correct I think I have something wrong in the configuration

I attached the configuration could you take a look to help me ?

0 项奖励
回复
5,670 次查看
RehabSoliman
Contributor I

I want to know is it mandatory to use power manager when I want to set the HSRUN mode 

or it is not related because if I turn the power manager the HSRUN mode not work  

0 项奖励
回复