I have taken ble_app_ancs_c_s130_pca10028 example and modified the application to run on our custom board. The custom board uses NRF51822 (NRF51 IC revision 3). The following two changes were made to the example.
1.change the target to nrf51822. 2.Changed the clock source to RC clock source as follows.
nrf_clock_lf_cfg_t rc_cfg = {
.source = NRF_CLOCK_LF_SRC_RC,
.rc_ctiv = 0, //
.rc_temp_ctiv = 0,
.xtal_accuracy =NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION,
};
The softdevice_enable function returns err_code 2. I also tried running the example available in nrf51822 example available in github link:
github.com/.../nRF51_SDK_v11
Tools: SDK11
version:2.0.0
softdevice: s130
Kiel version: 5.17
Please let me know what could be the possible reason for the error and how to resolve it.