HF and LF clock for nrf52840

Hello team,

We are building a product using nrf52840 and zephyr stack. We have one external crystal 32MHz for HF clock. By default, the zephyr enables the internal RC oscillator(HFINT) to generate the HF clock.

What is the right way to enable the external crystal(HFXO) from software to generate the HF clock?

The board does not have external crystal for LF. So we have two options to generate LF.

1) Synthesized from HFCLK

2) Generated by internal RC oscillator

What is the pros of cons of using each one of them and what is preferable way to choose?

Thanks in advance.

Brinda Bhatt

  • Hello Brinda,

    HFINT is used by default, but the protocol stacks will automatically request the HFXO source when higher clock accuracy is needed (e.g., when using the RADIO) and release it again when it is no longer needed. It is possible to request the HFXO from the application and keep it active, but doing so will have a negative impact on your idle current (idle current with HFXO active is typ. around 200 uA).

    The board does not have external crystal for LF. So we have two options to generate LF.

    Using the synthesized clock will also result in an increased idle current because it is derived from the HF clock source (prevents it from being released in System ON idle). The RC oscillator is generally the recommended choice for designs that don't include the LF crystal. 

    Kconfig symbol to select RC as the LF clock source:

    CLOCK_CONTROL_NRF_K32SRC_RC=y
    Best regards,
    Vidar
Related