CONFIG_CLOCK_CONTROL_NRF=y not satisfied — missing DT_HAS_NORDIC_NRF_CLOCK_ENABLED in blinky sample on nRF52832 DK (NCS 3.1.1)

When building the blinky sample with CONFIG_CLOCK_CONTROL_NRF=y set in prj.conf, the build doesn't enable the clock control and gives this warning:

warning: CONFIG_CLOCK_CONTROL_NRF was assigned the value 'y' but got the value 'n'.
Missing dependencies: DT_HAS_NORDIC_NRF_CLOCK_ENABLED

Steps to reproduce

  1. Start from the blinky sample targeting nrf52dk_nrf52832.
  2. Add the following to prj.conf:
    CONFIG_CLOCK_CONTROL_NRF=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
  3. Add the following board overlay (nrf52dk_nrf52832.overlay)
    &clock {
        status = "okay";
    };

Expected behavior

CONFIG_CLOCK_CONTROL_NRF should be satisfied since the clock node exists on the nRF52832 and is explicitly enabled via the overlay.

Actual behavior

DT_HAS_NORDIC_NRF_CLOCK_ENABLED is not being derived from the devicetree, so CONFIG_CLOCK_CONTROL_NRF falls back to n

Inspecting devicetree_generated.h confirms the clock node is correctly resolved in the devicetree:

#define DT_COMPAT_HAS_OKAY_nordic_nrf_clock 1
#define DT_N_S_soc_S_clock_40000000_COMPAT_MATCHES_nordic_nrf_clock 1
#define DT_N_INST_0_nordic_nrf_clock DT_N_S_soc_S_clock_40000000

The node is present and status = "okay", so DT_HAS_NORDIC_NRF_CLOCK_ENABLED should be satisfied. However, Kconfig still reports it as a missing dependency for CONFIG_CLOCK_CONTROL_NRF.

This suggests the issue is not in the devicetree itself, but in how DT_HAS_NORDIC_NRF_CLOCK_ENABLED is generated or consumed during the Kconfig evaluation phase in NCS 3.1.1. This may be a build system regression or a change in how DT-to-Kconfig symbol mapping works in this release.

Questions

  • Is DT_HAS_NORDIC_NRF_CLOCK_ENABLED expected to be auto-set for this board, or does something else need to change in the overlay/board files?
  • Is this a regression in NCS 3.1.1?

  • Hello,

    I would like to let you know that I have been assigned to this case and have started looking into it. I will get back to you with more information tomorrow.

    Kind Regards,

    Abhijith

  • Hello,

    I tried to reproduce this on my end, but I do not see the warning you shared. I am attaching my complete build log for reference.

    Executing task: nRF Connect: Generate config nrf52dk/nrf52832 for c:\ncs\v3.1.1\zephyr\samples\basic\blinky 
    
    Building blinky
    west build --build-dir c:/ncs/v3.1.1/zephyr/samples/basic/blinky/build c:/ncs/v3.1.1/zephyr/samples/basic/blinky --pristine --board nrf52dk/nrf52832 --sysbuild -- -DCONFIG_DEBUG_THREAD_INFO=y
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/66cdf9b75e/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v3.1.1/zephyr/.cache
    -- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
    -- Board: nrf52dk, qualifiers: nrf52832
    Parsing C:/ncs/v3.1.1/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/_sysbuild/empty.conf'
    Merged configuration 'C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/_sysbuild/empty.conf'
    Configuration saved to 'C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/_sysbuild/autoconf.h'
    -- 
       ****************************
       * Running CMake for blinky *
       ****************************
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v3.1.1/zephyr/samples/basic/blinky
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/66cdf9b75e/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v3.1.1/zephyr/.cache
    -- Zephyr version: 4.1.99 (C:/ncs/v3.1.1/zephyr)
    -- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
    -- Board: nrf52dk, qualifiers: nrf52832
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/66cdf9b75e/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/66cdf9b75e/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/66cdf9b75e/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v3.1.1/zephyr/boards/nordic/nrf52dk/nrf52dk_nrf52832.dts
    -- Found devicetree overlay: C:/ncs/v3.1.1/zephyr/samples/basic/blinky/nrf52dk_nrf52832.overlay
    -- Generated zephyr.dts: C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/blinky/zephyr/zephyr.dts
    -- Generated pickled edt: C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/blinky/zephyr/edt.pickle
    -- Generated devicetree_generated.h: C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/blinky/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing C:/ncs/v3.1.1/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v3.1.1/zephyr/boards/nordic/nrf52dk/nrf52dk_nrf52832_defconfig'
    Merged configuration 'C:/ncs/v3.1.1/zephyr/samples/basic/blinky/prj.conf'
    Merged configuration 'C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/blinky/zephyr/misc/generated/extra_kconfig_options.conf'
    Merged configuration 'C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/blinky/zephyr/.config.sysbuild'
    Configuration saved to 'C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/blinky/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/blinky/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/66cdf9b75e/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/66cdf9b75e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found gen_kobject_list: C:/ncs/v3.1.1/zephyr/scripts/build/gen_kobject_list.py
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/blinky
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build
    -- west build: building application
    [4/150] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.1.99 (C:/ncs/v3.1.1/zephyr), build: ncs-v3.1.1
    [150/150] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       22076 B       512 KB      4.21%
                 RAM:        6080 B        64 KB      9.28%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from C:/ncs/v3.1.1/zephyr/samples/basic/blinky/build/blinky/zephyr/zephyr.elf for board: nrf52dk
    [10/10] Generating ../merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 

    I checked devicetree_generated.h and also reviewed my zephyr.dts and the generated .config file.

    Kind Regards,

    Abhijith

  • Hi, I’m getting the same output as you, but I also see that warning when I hover over the config in prj.conf. Could this be an IntelliSense issue?

  • Hello,

    Okay, so this doesn’t affect the build. It looks like an editor mismatch rather than an actual Kconfig issue. Since the build output and generated files are correct, it’s safe to ignore, the hover tooltip is just a cosmetic issue.

    Kind Regards,

    Abhijith

Related