SYSCON Set up the system oscillator using XTALIN and XTALOUT

If you want to use the system oscillator with the LPC81x, you need to assign the XTALIN and XTALOUT pins, which connect to the external crystal, through the fixed-pin function in the switch matrix. XTALIN and XTALOUT can only be assigned to pins PIO0_8 and PIO0_9.

  1. In the IOCON block, remove the pull-up and pull-down resistors in the IOCON registers for pins PIO0_8 and PIO0_9.
  2. In the switch matrix block, enable the 1-bit functions for XTALIN and XTALOUT.
  3. In the SYSOSCCTRL register, disable the BYPASS bit and select the oscillator frequency range according to the desired oscillator output clock.

Related registers:

IOCON PIO0_8 addressOffset = 0x038

IOCON PIO0_9 addressOffset = 0x034

SWM registerName = PINENABLE0 addressOffset = 0x1C0

SYSCON registerName = SYSOSCCTRL addressOffset = 0x020


-->