Switching core clock to 204MHz repeatedly causes a system crash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Switching core clock to 204MHz repeatedly causes a system crash

408 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mirfan on Wed Nov 28 05:13:06 MST 2012
Hi,

I am working at Mentor Graphics and hoping to add Power Management support to LPC4350. I am using a HITEX board. My demo application switches the core at different operating frequencies (12MHz,48MHz, 96MHz and 204MHz) after every 2 seconds. The issue I am facing is somewhat already known i.e. Core crashes if its clock is ramped up from below 90MHz to 204MHz. The issue does not appear every time I make a switch. Right now I get a crash after around 40 mins. During this time the core is continuously moved to all the other operating frequencies without an issue but eventually it crashes. I have also put in the work around of moving the core to 204MHz in multiple steps using the FASTBOOT example as a reference. The code is running from internal SRAM.

Thanks
Irfan
Labels (1)
0 Kudos
3 Replies

381 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bjorn1989 on Tue Dec 24 05:33:47 MST 2013
Thanks, I did found how to do this.

// clock init
CGU_SetXTALOSC(12000000);
CGU_EnableEntity(CGU_CLKSRC_XTAL_OSC, ENABLE);
CGU_EntityConnect(CGU_CLKSRC_XTAL_OSC, CGU_CLKSRC_PLL1);

LPC_CGU->PLL1_CTRL |= (0x10<<16)| (1<<12) | (1<<8) |(1<<6)|(0<<7) |(0<<1); // powerdown

while((LPC_CGU->PLL1_STAT&1) == 0){};        //wait to lock

CGU_EnableEntity(CGU_CLKSRC_PLL1, ENABLE);
CGU_EntityConnect(CGU_CLKSRC_PLL1, CGU_BASE_M4);
CGU_UpdateClock();
// end clock init
0 Kudos

381 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bjorn1989 on Fri Dec 20 08:15:09 MST 2013
Dear Mirfan,

how do you change the core frequency, I also want to set the Core clock to 204MHz. I am using the MCB4300 board but the core is the same.
I know it must be done in steps, I use the PLL1_CTRL register to setup the dividers, XTAL as input ect.


Kindly thanks,
0 Kudos

381 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nxp21346 on Wed Nov 28 14:28:58 MST 2012
Hi!

To ramp up the clock frequency from low frequencies (< 90 MHz), you must increase the core clock BASE_M4_CLK in two steps from low frequencies to mid-range frequencies (90 MHz to 110 MHz) and subsequently from mid-level frequencies to high frequencies (up to 204 MHz). This is in the User's Manual in the CGU section.

-Dave @ nxp
0 Kudos