Kinetis KL05 clock configuration

cancel
Showing results for 
Search instead for 
Did you mean: 

Kinetis KL05 clock configuration

658 Views
juanm
Contributor III


Hi! I have a custom board with a KL05, 32 pin LQFP package, and an 8 MHz crystal. I also have the sample code package available from NXP website and I'm trying to use the files mcg.c and mcg.h in order to get a 48 MHz clock frequency.

I'm using the function fei_fee(). I understand that this function allows me to go from the default fei mode to the fee mode.

But I'm having troubles with this. If I use it like this:

clk = fei_fee(8000000,LOW_POWER,CRYSTAL);

The returned value is 20000000 (20 MHz), so I would like to know what function I need to use in order to get a 48 MHz clock from the 8 MHz external crystal.

Thanks!

PS: I'm using the last version of the Kinetis Design Studio and I don't want to use processor expert for this.

0 Kudos
1 Reply

206 Views
juanm
Contributor III

Anyone?

0 Kudos