Problem in initialization of clock

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

Problem in initialization of clock

Jump to solution
1,346 Views
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 Kudos
1 Solution
1,303 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @whiteliondd6 ,

Disconnect XTAL on the diagram directly.

jingpan_0-1646028686991.png

Regards,

Jing

 

View solution in original post

0 Kudos
3 Replies
1,320 Views
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 Kudos
1,315 Views
whiteliondd6
Contributor I

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

0 Kudos
1,304 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @whiteliondd6 ,

Disconnect XTAL on the diagram directly.

jingpan_0-1646028686991.png

Regards,

Jing

 

0 Kudos