Content originally posted in LPCWare by lpc_bloke on Wed Jul 29 01:10:19 MST 2015
This is all very well documented in chapter 4 of the user manual.
You will need to enable clock to IOCON and SWM.
Power up the crystal oscilator
wait a bit
set the PLL multiplier and dividers
Route the PLL clock input to the crystal OSC
Wait for the PLL to lock
Select the PLL output and the CPU clock
Correctly set up the AHB clock divisors
The function you are looking for was called SystemInit and it is usually called before main is called in the system startup code.
I currently run an LPC812 and 28MHz as I needed a specific divisor and this was the best clock frequency I found to meet my needs.
You could most likely get a 30MHz CPU clock from either 12MHz or 10MHz and the PLL and multiply and divide to suit you needs within the range documented in the user manual.
Good luck.