I try with this code
MCG -> C1 = 0x2AU;
MCG -> C2 = 0x20U;
MCG -> C4 = 0x00U;
MCG -> C5 = 0x09U;
MCG -> C6 = 0x58U;
MCG -> SC = 0x00U;
OSC -> CR = 0x80;
SIM -> SOPT1 = 0x000C0000UL;
SIM -> SOPT2 = 0x00010000UL;
SIM -> CLKDIV1 = 0x01140000UL;
but when i am debugging, after SystemCoreClockUpdate(), i get SystemCoreClock = 192 000 000
Hi
The latest version of the CMSIS startup file for this board contains the confguration for 120 MHz:
We have a new RTX_Blinky for this with MDK 5 Software pack. I assume you are using Keil MDK 5 ?
I attach the said system file here.
Thanks
Bob Boys
San Jose, California
Thanks, I tried with the blinky example first. now i understand clearly!
I'm having troubles with CLOCK_SETUP 1 and CLOCK_SETUP 3, the application doesn't run
Looking at the system file I see this:
3 ... Multipurpose Clock Generator (MCG) in PLL Engaged External (PEE) mode
Reference clock source for MCG module is an external crystal 8MHz
Core clock = 120MHz, BusClock = 60MHz
I look at the schematic for this board and do not see an 8 MHz crystal. 25 and 32K only....
Does this need to be added ? Perhaps to pin 51 XTAL_K64_MAIN ? I see a R74 too -
Bob
there is a way to configure the 120 MHz in CodeWarrior using the 25MHz crystal, i going to try to configure that on keil with your information, thanks
OK, Finally it's working!!!
You have to replace the file system_MK64F12.c to the newer version and add system_MK64F12.h to the project.
YOU DON'T HAVE TO REPLACE startup_MK64F12.s!!!