FRDM KL25Z pll_init failed

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

FRDM KL25Z pll_init failed

Jump to solution
1,629 Views
noahhuetter
Contributor I

Hi community!

I was working me through the video tutorial on this site but now im stuck on the chapter clock distribution.

My pll_init function returns 0x23 ->

mcg.c

if (!(MCG_S & MCG_S_OSCINIT0_MASK)) return 0x23;

GPIO and debugging works like a charm but changing the clock doesn't work. in low power mode, nothing happens. what could be wrong?

I'm using the source code that Eli Hughes has written on CodeWarrior 10.5 eclipse on Windows 8.1 64bit.

0 Kudos
1 Solution
857 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

The problem shows the system oscillator does not initialization successfully.

In the FREEDOM BOARD / CORTEX M0+ GETTING STARTED page with below info:

ERRATA!!! 

While working with a large number of Freedom boards in a course,  it was observed that the InitClockRoutines would *sometimes* not work.    *Some* of the crystals on the freedom boards do NOT like "HIGH_GAIN" mode.  The new code is uploaded to this page but you could also change the code yourself:

  pll_init(8000000, HIGH_GAIN, CRYSTAL, 4, 24, MCGOUT);

to

  pll_init(8000000, LOW_POWER, CRYSTAL, 4, 24, MCGOUT);


If you could change the external crystal clock work mode to low power mode and check if it works or not?

Wish it helps.

View solution in original post

0 Kudos
3 Replies
857 Views
zoromoth
Contributor II

Thanks a lot. I too had the same problem. Setting the low power mode solves the issue.

Regards,

Bharat

0 Kudos
858 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

The problem shows the system oscillator does not initialization successfully.

In the FREEDOM BOARD / CORTEX M0+ GETTING STARTED page with below info:

ERRATA!!! 

While working with a large number of Freedom boards in a course,  it was observed that the InitClockRoutines would *sometimes* not work.    *Some* of the crystals on the freedom boards do NOT like "HIGH_GAIN" mode.  The new code is uploaded to this page but you could also change the code yourself:

  pll_init(8000000, HIGH_GAIN, CRYSTAL, 4, 24, MCGOUT);

to

  pll_init(8000000, LOW_POWER, CRYSTAL, 4, 24, MCGOUT);


If you could change the external crystal clock work mode to low power mode and check if it works or not?

Wish it helps.

0 Kudos
856 Views
noahhuetter
Contributor I

Oops sorry this is my bad. I thought I tried LOW_POWER mode.

It's working :smileygrin: Thanks!

0 Kudos