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

Using 8.0.0 S110 SoftDevice with compiled bootloader and PCA20006 Beacon

I'm trying to update my beacon to use 8.0.0 SoftDevice 110. I've downloaded the 8.0.0 precompiled softdevice hex and loaded the Keil dfu_dual_bank_ble_s110_pca10028 project and changed the C++ options to specify BOARD_PCA20006.

Using nRFGo I can load the 8.0.0 SoftDevice and the bootloader but it does not go into DFU mode. If I do the same thing with the precompiled 7.x hex files for the beacon project it does go into DFU mode.

If I load the 8.0.0 softdevice and just the blinky app (compiled to start at 0x18000), it works fine. However if I add in the bootloader then the blinky app does not run and it does not enter DFU mode either.

I expected that just loading the softdevice and the bootloader that it should enter DFU update mode. Is there something additional needed to get the bootloader to work with 8.0.0 S110?

  • Hi

    If you want to load a new bootloader you may need to erase the chip first. Do that by pressing ERASE ALL button in nRFgo Studio.

    To use the S110 8.0.0 you probably need to use the bootloader from SDK 8/9 that are compatible with S110 8.0.0. See the nrf51 compatibility matrix for softdevice/SDK compatibility.

  • I did use the Erase all to start. I loaded the bootloader project using the Keil Examples tab and it included the 8.0.0 S110 hex file so I assume it should have been compatible. I did Erase-all, load the S110 hex, load the boatloader but it does not seem to go into DFU mode on reset. Are there any debugging tips that would help reveal the problem?

  • Have you followed this guide step by step?

    Do you know if the UICR.BOOTLOADADDR register is set? You can check it by using nrfjprog --memrd 0x10001014.

    You will need to use nrfjprog to program the bootloader. The step-by-step guide above shows how to set this up in Keil (but remove the --reset argument). Keil alone is not able to write to the bootloader address area.

    The Beacon also has less memory than the nRF51 on the pca10028. This is usually not a problem, but did you update the linker settings to accommodate for this?

  • Thanks for the tips provided here and elsewhere I was able to program my beacon with the 8.x softdevice, dfu, and an app via ble. Here is the relevant details:

    Building Bootloader for Beacon

    • Use the dfu_dual_bank_ble_s110_pca10028 project from the pack installer
    • Note that Beacon has 0x4000 RAM
    • Set BOARD_PCA20006 in C++ options
    • Set IROM1=0x3c00 3c00
    • Set IRAM1=0x20002000 0x1f80
    • Set IRAM2=0x20003f80 0x80 NoInit
    • Set BOOTLOADER_BUTTON BSP_BUTTON_0 in main.c
    • Set PSTORAGE_NUM_OF_PAGES 2 in pstorage_platform.h

    Using nRFGo Studio, erase the device, flash the 8.x softdevice followed by the dfu .hex. Uncheck the protect option for softdevice if you want to load it later via the dfu. The beacon should reset to dfu mode and show up in the DFU mobile utility advertising itself.

    Building the blinky app for Beacon

    • Set IRAM1=0x20002000 0x2000
    • Set IROM1=0x1800 0x0800
    • Set BOARD_PCA20006 in C++ options

    Convert blinky app to zip for use in mobile app

    • nrfutil dfu genpkg --application blinky/pca10031/s110/arm5/_build/nrf51422_xxac.hex c:/temp/blinky.zip
    • Transfer the .zip to your mobile device and use the DFU mobile app to load it into the beacon.
  • Perhaps Martin is referring to this guide.

    The beacon you have has probably 16kB or RAM but the dfu_dual_bank_ble_s110_pca10028 project is ported to the 32kB nRF51 chip, so you probably need to change the IRAM1 settings in Keil -> Options for Target -> C/C++ tab. The IRAM1 Start should be 0x20002000 and the IRAM1 Size should be 0x2000

Related