Problem in initialization of clock

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

Problem in initialization of clock

跳至解决方案
2,266 次查看
whiteliondd6
Contributor I

I am using MKE16Z64VLD4 microcontroller and I am not using EXTAL OSC and I am not assigning these the pins to the microcontroller from pin config tool. But, when I tried to build the code, the code is stuck in while loop these function.

 /* Init SOSC according to board configuration. */
CLOCK_InitSysOsc(&g_scgSysOscConfig_BOARD_BootClockRUN);

while loop inside above function:

/* Step 4. Wait for OSC clock to be valid. */
while (0UL == (SCG->SOSCCSR & SCG_SOSCCSR_SOSCVLD_MASK))
{
}

 

What should I do to build the code?

@Pavel_Hernandez 

0 项奖励
回复
1 解答
2,223 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @whiteliondd6 ,

Disconnect XTAL on the diagram directly.

jingpan_0-1646028686991.png

Regards,

Jing

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,240 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @whiteliondd6 ,

The SDK demo use external 8Mhz crystal by default. If your board hasn't crystal, you should not use CLOCK_InitSysOsc(). You can use the config tool to generate your clock configuration.

 

Regards,

Jing

0 项奖励
回复
2,235 次查看
whiteliondd6
Contributor I

Yes, I don't have external crystal. But, how to use pin config tool to disable the CLOCK_InitSysOsc()?

0 项奖励
回复
2,224 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @whiteliondd6 ,

Disconnect XTAL on the diagram directly.

jingpan_0-1646028686991.png

Regards,

Jing

 

0 项奖励
回复