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

definition of clock parameters in SDK14 (sdk_config.h)

I ran into the issue where the clock definitions were defined in both the "board_pcaXXX.h" file and the sdk_config.h.

e.g. NRF_SDH_CLOCK_LF_XTAL_ACCURACY NRF_SDH_CLOCK_LF_SRC NRF_SDH_CLOCK_LF_RC_CTIV NRF_SDH_CLOCK_LF_RC_TEMP_CTIV

I didn't realize they had moved to sdk_config.h, and obviously, when I tried to compile and run with different clock parameters set in the board specific file, they were not picked up and trouble continued.

After realizing they moved to sdk_config.h, my problem was fixed, but I note that typically these parameters are "board"-specific, and not "SDK" specific -- and ideally should be placed in the board specific package. I've made that change locally, but it will cause much grief when I have to remember to remove it from the next SDK_CONFIG.H file.

What's the strategy here for these parameters? I believe it should be reviewed and conveyed.

  • Hi,

    Even if the board itself have or don’t have an external LF crystal, you still have the option to configure the SoftDevice to use the internal LF-RC and how often the SoftDevice should calibrate the clock source. They are connected, since the board limits the available clock sources, but in the end you are not really configuring the board here, you are configuring the SoftDevice.

    And also generally you want to have a single place to configure your project (sdk_config.h).

Related