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

First application load

I have a 'fresh' nRF51822 on a board and it's not clear to me what procedure I need to follow in order to get it to work. I'm using the Segger programmer and I can program the device through Keil and nRFgo Studio, but I see no activity from the chip.

Do I need to program both a bootloader and a softdevice? If so, which bootloader do I use, and where do I find it?

Any other advice for bringing up a 'fresh' chip would be appreciated!

  • I'll try to share what I have figured out in the past two days of playing with the nrf51822. You certainly don't need to program the bootloader but you do need to program at least one GATT service.

    1. I presume you have the softdevice somewhere on your computer. I used s110 v6.0.0.

    2. You will have to use Keil to compile at least one GATT service. I compiled ble_app_hrs from C:\Keil_v5\ARM\Device\Nordic\nrf51822\Board\pca10001\s110\ble_app_hrs. Without this step, even if you deploy the softdevice to nrf51822, you won't see the board from, say, Nordic's iOS app (available in the App Store.)

    3. I tried to use keil to deploy the softdevice and the GATT service to the board but it kept failing. The error message is covered here: devzone.nordicsemi.com/.../

    4. Then I used nRFGo to deploy the softdevice first followed by the ble_app_hrs GATT service.

    At this point, LED_0 blinked a few times and the Nordic app in the app store was able to detect the board as a Heart Rate Monitor.

    Hope this helps.

  • I managed to program the device, but the ble_app_hrs design doesn't seem to work on the chip. It doesn't advertise. Have you changed anything in the design to make it work?

  • As soon as you pushed the ble_app_hrs to nrf51822, either LED_0 or _1 (i forget which) should light up. Did that happen?

    If you use Keil to open and compile the ARM project under C:\Keil_v5\ARM\Device\Nordic\nrf51822\Board\pca10001\s110\ble_app_hrs\arm, I don't think you need to change anything to make it compile in Keil.

    Otoh, if you want to use to gcc and eclipse to make and deploy ble_app_hrs, then you will have to

    1. Create Makefile.posix in Source\templates\gcc

    2. Create a folder called gcc inside ble_app_hrs. Then create a makefile in gcc with this content: gist.github.com/.../6855716

    3. Then make and deploy to nrf51822 like you would any other gcc project.

Related