Please consult UM10360 LPC17xx User manual. The manual has detail of setting main osc.
see the link
http://www.nxp.com/documents/user_manual/UM10360.pdfat page 28
3.7.1 System Controls and Status register give you the value of the register for Keil.
OSCRANGE Main oscillator range select. R/W 0
0 The frequency range of the main oscillator is 1 MHz to 20 MHz.
1 The frequency range of the main oscillator is 15 MHz to 25 MHz.
OSCEN Main oscillator enable. R/W 0
0 The main oscillator is disabled.
1 The main oscillator is enabled, and will start up if the correct external circuitry is connected to the
XTAL1 and XTAL2 pins.
OSCSTAT Main oscillator status. RO 0
0 The main oscillator is not ready to be used as a clock source.
1 The main oscillator is ready to be used as a clock source. The main oscillator must be enabled via the
OSCEN bit.
at page 31
4.3.2 Main oscillator
Here you can see the components required for main oscillator.