FRDM KL25Z pll_init failed

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

FRDM KL25Z pll_init failed

跳至解决方案
2,548 次查看
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 项奖励
回复
1 解答
1,776 次查看
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 项奖励
回复
3 回复数
1,776 次查看
zoromoth
Contributor II

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

Regards,

Bharat

0 项奖励
回复
1,777 次查看
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 项奖励
回复
1,775 次查看
noahhuetter
Contributor I

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

It's working :smileygrin: Thanks!

0 项奖励
回复