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

S130 softdevice is not working with nRF51822

Hi,

I am working on one project in which I want to connect my two custom borads with S130 softdevice but I am not able to do that. My custom board has nRF51822 chipset and has no external oscillator for softdevice.

For this I have simply taken SDK 11.0.0. Changed clock settings NRF_CLOCK->XTALFREQ = 0xFFFFFF00 and from NRF_CLOCK_LF_SRC_XTAL to NRF_CLOCK_LF_SRC_RC in ble_app_hrs_c (SDK/examples/ble_central/ble_app_hrs_c) and ble_app_hrs (SDK/examples/ble_periphreal/ble_app_hrs) example codes according to my board.

When I debug this issue, I found that central board is not even able to scan peripheral board. I am able to see peripheral board in nRFMasterControlPanel in android.

Does anyone has idea what settings I need to do either in central side or peripheral side to able to connect two nRF51822 boards with each other.

Thanks,

  • HF clock: Are you using 32MHz or 16MHz crystal? You are configuring in your code for 32MHz crystal (NRF_CLOCK->XTALFREQ = 0xFFFFFF00).

    For the LF clock: You have to set the calibration interval in addition to changing the sorce, for example this config:

    nrf_clock_lf_cfg_t clock_lf_cfg =   {.source        = NRF_CLOCK_LF_SRC_RC,            \
                                         .rc_ctiv       = 16,                                \
                                         .rc_temp_ctiv  = 1,                                \
                                         .xtal_accuracy = 0}
    

    See here for more info about lf clock config (nrf_clock_lf_cfg_t).

Related