Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf_drv_clock module - undefined reference error

In nRF5_SDK_15.3.0 some undefined reference error reported when using nrf_drv_clock module (example: undefined reference to `nrf_drv_clock_hfclk_release)

The problem is in SDK_ROOT\integration\nrfx\legacy\nrf_drv_clock.c. Instead of nordic_common.h, sdk_common.h should be included

existing:

#include <nordic_common.h>
#include "nrf_drv_clock.h"

#if NRF_MODULE_ENABLED(NRF_CLOCK)

fixed:

#include "sdk_common.h"
#if NRF_MODULE_ENABLED(NRF_CLOCK)
#include "nrf_drv_clock.h"

Related