clock frequency of lpc4330 explorer

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

clock frequency of lpc4330 explorer

561 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by assad on Sat Mar 09 11:18:08 MST 2013
Hello every one can any 1 tell me how to set clock frequency of lpc4330 at 204 MHz in this file. pls reply

Original Attachment has been moved to: lpc43xx_cgu.c.zip

Labels (1)
0 Kudos
4 Replies

400 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Fri Apr 18 07:37:19 MST 2014
Hi srinidhi,
You can route system clock to pins. Please see user manual for more detailed information
http://www.nxp.com/documents/user_manual/UM10503.pdf
0 Kudos

400 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by srinidhi M on Fri Apr 18 01:47:35 MST 2014
Hello ASSAD,

How i can check my clock frequency?
0 Kudos

400 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by assad on Mon Mar 11 20:55:12 MST 2013
CGU_SetPLL1(17);
at this value my audio codec is not working
it works till CGU_SetPLL1(14); it is 168MHz but i want to reach 204MHz but i dont know what is prob in my lpc4330_explorer
0 Kudos

400 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Sun Mar 10 07:27:00 MST 2013
That looks like the LPC43xx CMSIS code bundle package. The basic setup code is below. http://sw.lpcware.com/?p=lpc43xx.git;a=blob;f=Examples/BOOTFAST/Fast_Gpio_LedBlinky/Hitex_Fast_Start...

<code>
/* Set the XTAL oscillator frequency to 12MHz*/
CGU_SetXTALOSC(__CRYSTAL);
CGU_EnableEntity(CGU_CLKSRC_XTAL_OSC, ENABLE);
CGU_EntityConnect(CGU_CLKSRC_XTAL_OSC, CGU_BASE_M4);

/* Set PL160M 12*1 = 12 MHz */
CGU_EntityConnect(CGU_CLKSRC_XTAL_OSC, CGU_CLKSRC_PLL1);
CGU_SetPLL1(1);
CGU_EnableEntity(CGU_CLKSRC_PLL1, ENABLE);

...
...

/* Set PL160M @ 12*9=108 MHz */
CGU_SetPLL1(9);

/* Run base M3 clock from PL160M, no division */
CGU_EntityConnect(CGU_CLKSRC_PLL1, CGU_BASE_M4);

/* Change the clock to 204 MHz */
/* Set PL160M @ 12*17=204 MHz */
CGU_SetPLL1(17);
</code>

You can also update to the LPCOpen code, which does it like this. http://docs.lpcware.com/lpcopen/sysinit__ngx__xplorer__18304330_8c_source.html

<code>
/* Switch main system clocking to crystal */
Chip_Clock_EnableCrystal();
Chip_Clock_SetBaseClock(CLK_BASE_MX, CLKIN_CRYSTAL, true, false);

/* Setup PLL for 100MHz and switch main system clocking */
Chip_Clock_SetupMainPLLHz(CLKIN_CRYSTAL, CRYSTAL_MAIN_FREQ_IN, 100 * 1000000, 100 * 1000000);
Chip_Clock_SetBaseClock(CLK_BASE_MX, CLKIN_MAINPLL, true, false);

/* Setup PLL for maximum clock */
Chip_Clock_SetupMainPLLHz(CLKIN_CRYSTAL, CRYSTAL_MAIN_FREQ_IN, MAX_CLOCK_FREQ, MAX_CLOCK_FREQ);
</code>
0 Kudos