lpcware

Execution frequency(72MHz--->120MHz)

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by shiggy on Sun Sep 22 00:02:34 MST 2013
Hi Everyone!

I have changed the code execution frequency from 72MHx to 167MHz by using the bellow code.
Q1) Is my programming code correct or necessay some modification?
Q2)Is the two step frequency_up(72MHz--->110MHz---->120MHz) necessay?
  (depending on the Chp 10.2.1 of UM10430)
A)CGU_InitX(void)code working correctly at present.

If you give me any comment, I mam very happy.

------------------------------------------------------------------
uint32_t CGU_InitX(void){
CGU_SetXTALOSC(12000000);
CGU_EnableEntity(CGU_CLKSRC_XTAL_OSC, ENABLE);
CGU_EntityConnect(CGU_CLKSRC_XTAL_OSC, CGU_CLKSRC_PLL1);
// Disable PLL1 CPU hang???
//CGU_EnableEntity(CGU_CLKSRC_PLL1, DISABLE);//AAA if this is, error
//CGU_SetPLL1(6);//<----- execution FRQ is 72MHz//AAA
CGU_SetPLL1(10);  //<----- execution FRQ is 167MHz//AAA
CGU_EnableEntity(CGU_CLKSRC_PLL1, ENABLE);
CGU_EntityConnect(CGU_CLKSRC_PLL1, CGU_BASE_M3);
CGU_UpdateClock();
return 0;
}
-----------------------------------------------------------------
Shiggy

Outcomes