Clock Problem on MKV58

cancel
Showing results for 
Search instead for 
Did you mean: 

Clock Problem on MKV58

252 Views
softwaretestsof
Contributor I

Hello,

I am having a trouble with MKV58 clock configuration.

I have a TWR Board and MCU expresso IDE.I simply running "lwip tcp/echo bare metal" example
without an issue.

However,In my custom board,the example simply stucks in


" BOARD_BootClockRUN();"
-CLOCK_BootToPeeMode(kMCG_OscselOsc,
kMCG_PllClkSelPll0,
&mcgConfig_BOARD_BootClockRUN.pll0Config);
-CLOCK_SetPbeMode(pllcs, config);
-while ((MCG->S & (MCG_S_IREFST_MASK | MCG_S_CLKST_MASK)) !=
(MCG_S_IREFST(kMCG_FllSrcExternal) | MCG_S_CLKST(kMCG_ClkOutStatExt)))


I ve tried to run "Engaded Internal Clock Modes" without an issue,but when it comes to
run "Engaded External Clock" modes it simply stucks.

In my custom board I have a 50Mhz oscillator which is connected to EXTAL Pin of mcu.
I observed TWR board and my custom board oscillator inputs,both are the same.

if i comment 

-while ((MCG->S & (MCG_S_IREFST_MASK | MCG_S_CLKST_MASK)) !=
(MCG_S_IREFST(kMCG_FllSrcExternal) | MCG_S_CLKST(kMCG_ClkOutStatExt)))

and

/* Disable PLL first, then configure PLL. */
MCG->C6 &= ~MCG_C6_PLLS_MASK;
while (MCG->S & MCG_S_PLLST_MASK)
{
}

application gives error in my custom board at

- MCG->C6 |= MCG_C6_PLLS_MASK;

However, it doesnt happen on TWR Board at all!

However, it doesnt happen on TWR Board at all!

So,my questions are,

-Do i miss something to make clock configuration using Clock Config Tools ?
-What could be the issue ?
-What else do i need to check ?

King Regards.

Labels (1)
0 Kudos
2 Replies

136 Views
softwaretestsof
Contributor I

Hi Da Li

We found the problem.We have measured the clock signal and it was Ok.

We have spot that the MKV58 EXTAL Pin was not  soldered properly.

Thanks.

King Regards

0 Kudos

136 Views
nxf56274
NXP TechSupport
NXP TechSupport

Hi,

I suggest you should use oscilloscope to measure if the external crystal oscillator has the normal wave.

0 Kudos