Using nRF51 SDK with the nRF51822 MBED Kit


This blog post will not take installation of above dependencies into consideration.

Configuring a project for CMSIS-DAP debugger:

  1. Open a project in Keil, and go to Options for Target, and select CMSIS-DAP Debugger under the debug tab: image description

  2. Check that the "Use Debug Driver" is checked under Utilities tab: image description

  3. Now go into the debugger settings and verify that the nRF51xxx programming algorithm is chosen: image description

  4. Go to tab "debug" and see that the debugger and device is recognized and properly configured: image description

Loading Softdevice S110 v6 or older:

As the softdevice depends on writing to UICR in these versions, and the flash algorithm does not allow this, we must use the MBED enumerated drive to load the softdevice.

  1. Download the S110 softdevice from our website.

  2. Extract the content to your desired location.

  3. Copy the softdevice .hex file to the MBED enumerated drive X:\ (where X is the MBED drive for your specific computer)

  4. Once loaded, please follow the "configuring a project for CMSIS-DAP debugger" section for the s110 project of your desire.

Loading Softdevice S110 v7 or newer:

Since this version of the softdevice does not write into UICR, you have two options:

  1. Load it using the same option as for S110 <= v6

  2. Load it by creating an empty project, with the softdevice .hex file as the "Name of Executable" in Keil project settings. Copy the softdevice .hex file to the location of the newly created "empty" Keil project.


  • I'm getting this error when trying to program the softdevice:

    Error: Flash Download failed - "Cortex-M0"

Try blanking the nRF device. This is done by holding in the RESET button for 5 seconds. The LED "LD3" will start blinking slowly, then faster. Hold the RESET button until the LED is continuously lit. Now the flash on the nRF should be completely erased.

Note: The softdevice is not erase-protected using these method, so do not choose "Erase Full Chip" under "Flash Download" section when developing your application! This behavior will change with future versions of the flash programming algorithm that is supplied with the nRF51 SDK installer.