In NCS 3.1.1, how to use the internal low-frequency crystal oscillator?

Hello team.

         I copied a blink application and it runs fine on the nrf52840dk. However, it won't run after I download it to the product. I compared it and found that my product does not have an external low-speed crystal oscillator. My question is:

1. Do I need to configure it to use the internal crystal oscillator for proper operation?

2. I see that I can set the clock source in Kconfig, but unfortunately, the interface is grayed out and I can't access it. I'd like to know why.

3. My 52840 chip is in a QFN package, so it doesn't support high-voltage DC-DC, but it does have a DC-DC inductor on the chip's periphery. How do I configure it to use LDO or DC-DC mode?

Thank you very much.

  • Hi,

    The high frequency crystal oscilltor is requiered, but you do not need the optional 32.768 kHz oscillator. To use the LFRC instead, add this to your configuration (typically in the board default configuration, but you can also add it in prj.conf):

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

    The development kit use DCDC by default, so you either need to modify the device tree setting DCDC mode like this (this can be done by modifying the board files, which you typically will do for custom boards, or in an noverlay file):

    &reg1 {
    	regulator-initial-mode = <NRF5X_REG_MODE_LDO>;
    };

Related