I can add that the working peripheral example has the following clock settings:
In main header
#if MODULE_WT
#undef NRF_CLOCK_LFCLKSRC
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_SYNTH, \
.rc_ctiv = 0, \
.rc_temp_ctiv = 0, \
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
#endif
In ble_stack_init:
nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
// Initialize SoftDevice.
SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
The central example looks a bit different. In ble_stack_init, the SDK example doesn't pass a struct to SOFTDEVICE_HANDLER but only a defined value as:
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, NULL);
When setting the clock source to NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, I get the error code 7 as I wrote earlier.
However, when setting the clock source to NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, I get the error code 0x1000.
I can add that the working peripheral example has the following clock settings:
In main header
#if MODULE_WT
#undef NRF_CLOCK_LFCLKSRC
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_SYNTH, \
.rc_ctiv = 0, \
.rc_temp_ctiv = 0, \
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
#endif
In ble_stack_init:
nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
// Initialize SoftDevice.
SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
The central example looks a bit different. In ble_stack_init, the SDK example doesn't pass a struct to SOFTDEVICE_HANDLER but only a defined value as:
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, NULL);
When setting the clock source to NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, I get the error code 7 as I wrote earlier.
However, when setting the clock source to NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, I get the error code 0x1000.