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

How to Program RF-BM-ND01 (nrf51822) BLE4.0

Hi,

I have RF-BM-ND01 (nrf51822) BLE4.0 module and i am programming it using nrfjprog tool. and i am using nrf SDK12 to program examples. i tried to flash  softdevice S130, S120 and its examples flash downloading successfully. but i dont know whether code is running or not (because TX and Rx are disabled in hardware and i am using CLK and SDA pins to download code).

Please suggest me which softdevice version i need to use.

So please guid me to program RF-BM-ND01 (nrf51822) BLE4.0.

  • Hi,

    There are three SoftDevice variants available for the nRF51:

    • S110 - peripheral only
    • S120 - central only
    • S130  - central and peripheral.

    The S130 SoftDevice is the most resent and feature rich, so this is the recommended SoftDevice to use unless you are so limited in flash space that you have to use another one. SDK 12.3, which is the most recent SDK for the nRF51 targets S130 version 2.0.1.

    Regarding programming there is no difference between any modules. You need to use a SWD debugger of some sort (Nordic tools support J-Link).

  • thanks for the Quick reply.

    Actually, my module is RF-BM-ND01.  i am able to download hex file on it. but it is not advertising at all. so is it possible to use nrf12.3 SDK for  RF-BM-ND01 module?

    I even tried to download s130 from SDK12.3 and downloaded BLE_app_uart example file inRF-BM-ND01, the download was successful but the application is not running(not observed any advertisements in nrf connect app).

  • Hi,

    The RF-BM-ND01 module is based on a nRF51822 chip, so you can use any SDK with support for it. The latest SDK for nRF51 is SDK 12.3, so you are using the correct SDK. A typical issue when using SDK examples with modules is that some modules does not include the optional 32.768 kHz crystal, but the SDK examples assume it is present out of the box. If that is the case, using a unmodified example will not work, as the SoftDevice will attempt to start the non-existing crystal oscillator.

    Assuming this is the problem, you have to adjust the SoftDevice configuration so that it uses the internal LFRC oscillator instead. In most SDK examples, that means that you need to change the nrf_clock_lf_cfg_t instance which is passed to softdevice_handler_init(), for instance by setting it to something like this:

    #define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC,              \
                                     .rc_ctiv       = 0,                                \
                                     .rc_temp_ctiv  = 0,                                \
                                     .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM}

  •  tried to change crystal frequency as

    // Low frequency clock source to be used by the SoftDevice

    #ifdef S210

    #define NRF_CLOCK_LFCLKSRC      NRF_CLOCK_LFCLKSRC_XTAL_20_PPM

    #else

    #define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC,            \

                                     .rc_ctiv       = 0,                                \

                                     .rc_temp_ctiv  = 0,                                \

                                     .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM}

    #endif

    in file location 

    /nRF5_SDK_12.3.0_d7731ad/components/boards/pca10028.h

    still i am facing issue.

  • I see. Then some debugging is required:

    1. Have you remembered to flash the SoftDevice as well as the application .hex?
    2. Can you put a breakpoint in the beginning of the main function to verify that the application starts and you are able to debug?
    3. ...
Related