Datasheet

Table Of Contents
Table 267. INTS
Register
Bits Name Description Type Reset
31:1 Reserved. - - -
0 CLK_SYS_RESUS RO 0x0
2.16. Crystal Oscillator (XOSC)
2.16.1. Overview
The Crystal Oscillator (XOSC) uses an external crystal to produce an accurate reference clock. The RP2040 supports
1MHz to 15MHz crystals and the RP2040 reference design (see Hardware design with RP2040, Minimal Design
Example) uses a 12MHz crystal. The reference clock is distributed to the PLLs, which can be used to multiply the XOSC
frequency to provide accurate high speed clocks. For example, they can generate a 48MHz clock which meets the
frequency accuracy requirement of the USB interface and a 133MHz maximum speed system clock. The XOSC clock is
also a clock source for the clock generators, so can be used directly if required.
If the user already has an accurate clock source then it is possible to drive an external clock directly into XIN (aka XI),
and disable the oscillator circuit. In this mode XIN can be driven at up to 50MHz.
If the user wants to use the XOSC clock outside the RP2040 then it must be routed out to a GPIO via a clk_gpout clock
generator. It is not recommended to take it directly from XIN (aka XI) or XOUT (aka XO).
Figure 33. XOSC
overview
2.16.2. Usage
The XOSC is disabled on chip startup and the RP2040 boots using the Ring Oscillator (ROSC). To start the XOSC, the
programmer must set the CTRL_ENABLE register. The XOSC is not immediately usable because it takes time for the
oscillations to build to sufficient amplitude. This time will be dependent on the chosen crystal but will be of the order of
a few milliseconds. The XOSC incorporates a timer controlled by the STARTUP_DELAY register for automatically
managing this and setting a flag (STATUS_STABLE) when the XOSC clock is usable.
2.16.3. Startup Delay
The STARTUP_DELAY register specifies how many clock cycles must be seen from the crystal before it can be used.
This is specified in multiples of 256. The SDK xosc_init function sets this value. The 1ms default is sufficient for the
RP2040 reference design (see Hardware design with RP2040, Minimal Design Example) which runs the XOSC at 12MHz.
When the timer expires, the STATUS_STABLE flag will be set to indicate the XOSC output can be used.
Before starting the XOSC the programmer must ensure the STARTUP_DELAY register is correctly configured. The
required value can be calculated by:
So with a 12MHz crystal and a 1ms wait time, the calculation is:
RP2040 Datasheet
2.16. Crystal Oscillator (XOSC) 240