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.
Solved! Go to Solution.
The problem shows the system oscillator does not initialization successfully.
In the FREEDOM BOARD / CORTEX M0+ GETTING STARTED page with below info:
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.
Thanks a lot. I too had the same problem. Setting the low power mode solves the issue.
Regards,
Bharat
The problem shows the system oscillator does not initialization successfully.
In the FREEDOM BOARD / CORTEX M0+ GETTING STARTED page with below info:
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.
Oops sorry this is my bad. I thought I tried LOW_POWER mode.
It's working :smileygrin: Thanks!