HFCLK controller

nRF54LM20A | nRF54LM20B Datasheet

The HFCLK clock controller provides the following clocks to the system.

Table 1. Clocks
Clock Description
HCLKCORE MCU power domain and CPU clock where 64 or 128 MHz can be selected.
PCLK32M 32 MHz peripheral clock for RADIO peripherals, PDM (PCLK) and TDM (PCLK).
PCLK24M 24 MHz peripheral clock for USB, PDM (ACLK), and TDM (ACLK). PCLK24M requires HFXO to be running. See the XO24MSTART task for details, in addition to PCLK24M and HFXO for more information.
PCLK16M 16 MHz peripheral clock.
PCLK1M 1 MHz peripheral clock.
Table 2. Sources
Clock source Description
HFINT 128 MHz internal oscillator
HFXO 32 MHz crystal oscillator
The following HFCLK sources generate the HFCLK clocks:
  • 128 MHz internal oscillator — PLL is operating in free running mode
  • 32 MHz crystal oscillator — PLL is locked on a crystal (XOSC), optionally using built-in capacitors as described in OSCILLATORS — Oscillator control.

CPUs, peripherals, and other system components automatically request clocks. The HFCLK control passes the request to the power and clock subsystem. When the clocks are running, the HFCLK control distributes them to the components. The CPU clock frequency can be selected, as described in OSCILLATORS — Oscillator control.

When all HFCLK control requests end, the HFCLK control stops requesting CLOCK from the power and clock subsystem. For example, when the CPU enters sleep or when peripherals have completed their tasks, HFCLK stops CLOCK requests. If there are no requests for HFCLK or PCLK control, the power and clock subsystem automatically stops the clock.

When the system enters System ON mode and an HFCLK clock is requested, the PLL is automatically started. When clock requests stop, the PLL automatically stops.

HFCLK clocks are only available to the HFCLK controllers when the system is in System ON mode.

An HFCLK source can run before being started by the relevant clock request. This reduces start-up time but causes increased power consumption. An example of this would be to keep the PLL running during sleep by using the task PLLSTART.

HFXO must be started when crystal clock accuracy is required. The crystal is started by triggering the task XOSTART. When the crystal reaches the correct amplitude and frequency, the PLL automatically locks to the crystal and generates the event XOSTARTED. At the same time, the crystal oscillator is performing an XOTUNE. When that process finishes, the event XOTUNED is generated indicating the signal from the crystal oscillator is accurately tuned. The XOTUNED event is always generated after the XOSTARTED event. If the XOTUNE process fails, the event XOTUNEFAILED is generated. When that happens, the XOTUNE process must be started by triggering the task XOTUNE. The task XOSTOP will stop the crystal oscillator and the XOTUNE process (if it is running). The XOTUNE process will continue from where it left off, when the XOSTART task is triggered again.

If the crystal oscillator requires the XOTUNE process to be repeated, the device generates the event XOTUNEERROR. When that happens, the XOTUNE task must be triggered. This task does not request the crystal oscillator to start and it only takes effect if the crystal oscillator is already running. Do not trigger this task at the same time that RADIO is running (meaning RADIO must not be in the RX or TX states). A successful XOTUNE process is indicated by the event XOTUNED. If the procedure fails to complete, the XOTUNEFAILED event is generated. When a failure is detected, the XOTUNE process must be repeated. Repeated failures to complete the XOTUNED process indicates a faulty crystal or load capacitors.

Note: The crystal oscillator quality indicated by the XOSTARTED event is sufficient for all peripherals except RADIO and when calibrating the 32.768 kHz oscillator. Before using RADIO, ensure that the event XOTUNED has been generated. This ensures the highest quality crystal signal is available.

A new START task can be initiated after one has already been triggered, but before the corresponding STARTED event is generated. In this case, only one STARTED event will be generated, corresponding to the last triggered START task. Triggering a START task after the STARTED event from a previous triggered START tasks is generated, generates a new STARTED event.

The amount of time between a START task and its corresponding STARTED event may differ depending on whether the HFCLK source is already running or in the process of starting. The amount of time before a STARTED event may vary when a different HFCLK source is configured before triggering a new START task. Different crystal types also have different start-up times, see OSCILLATORS — Oscillator control for details.

HFXO must be running to use RADIO, USBHS, NFCT, UARTE, or to calibrate the 32.768 kHz RC oscillator. Using HFXO will also improve SAADC performance by reducing clock jitter. When using serial communication peripherals such as SPIM, SPIS, TWIM, and TWIS, the HFXO must be running to achieve the highest accuracy for the bit rate. When using the internal RC oscillator (HFINT), the frequency accuracy of the serial interface is limited to the accuracy of HFINT, see High frequency clock source (HFCLK).

PCLK24M and HFXO

A 24 MHz PLL generates the PCLK24M clock and requires the 32 MHz crystal oscillator (HFXO) as a reference for locking. PCLK24M is started by triggering the task XO24MSTART, which requests HFXO as a reference source for the 24 MHz PLL.

When HFXO is requested through the XO24MSTART task, the crystal oscillator performs the XOTUNE process and generates the event XOTUNED when tuning completes successfully.

The XOTUNED event is generated only once when HFXO starts and completes tuning. If HFXO is already running and tuned, triggering either XO24MSTART or XOSTART will not generate a new XOTUNED event.