This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error while porting from SDK12 to SDK15

I am porting to SDK15 and this is the error I am getting:

../../../main.c: In function 'ble_stack_init':
../../../main.c:2746:2: error: unknown type name 'nrf_clock_lf_cfg_t'
nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC2;

^~~~~~~~~~~~~~~~~~

In the make file I have included $(SDK_ROOT)/components/softdevice/s132/headers \ 

Is there anything else that needs to be done?

  • Hi,

    In SDK 15 the sd_softdevice_enable() is called using the function nrf_sdh_enable_request(). The LFCLK oscillator source settings are set like this:

        nrf_clock_lf_cfg_t const clock_lf_cfg =

        {

            .source       = NRF_SDH_CLOCK_LF_SRC,

            .rc_ctiv      = NRF_SDH_CLOCK_LF_RC_CTIV,

            .rc_temp_ctiv = NRF_SDH_CLOCK_LF_RC_TEMP_CTIV,

            .accuracy     = NRF_SDH_CLOCK_LF_ACCURACY

        };

    nrf_clock_lf_cfg_t is defined in the file nrf_sdm.h

     

    We have migration guides here, here and here, but depending on how big your project is, it could be easier to start with a SDK 15 example project, and then port your application to that SDK 15 example.

Related