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

About BLE DFU

Hi, I want to use BLE to run DFU. My sdk is 8.1.1 and base project is ble_app_uart. When I use nrfgo Studio to program softdevice, bootloader and app, It can't enter app. But if I use nrfgo Studio to program softdevice and bootloader only, and upload the same app by MCP, It can enter app and work well. So what's wrong with the bootloader? By the way, I use 51822 but the bootloader's chip is 51422, for it does'nt work if I choose 51822. Does this effect?

Parents
  • Hi

    Thank you for your questions

    To address your former question, please take a look at my answer on this thread, and the update from 16.4.2015

    For your latter question, where are you choosing 51822 and 51422. These two chips have identical functionality when using BLE, see this thread.

    Update 21.10.2015 After you install nRF Tools, mergehex.exe and nrfjprog.exe programs should be available under \Program Files (x86)\Nordic Semiconductor\nrf5x\bin. Merge the 3 hex files together, the softdevice, the bootloader and the application as described on this thread. To make the application valid, you must also merge the app_valid_settings_apply.hex. When you have merged the 4 hex files, you can upload the merged hex file to the device and it should start the application.

    Another way is to flash the softdevice hex file and then the bootloader hex file, and then the device should start in bootloader mode. Then you can upload application via Android nRFToolbox, IOS nRFToolbox, Windows Phone nRF Toolbox or Master Control Panel (MCP) on windows PC. To upload application via phone/tabled or MCP, you must create an image file for that purpose as described here. for further reading, read the bootloader documentation in the nRF51 SDK. This thread also contains a Bootloader tutorial, and the futher reading contains very good links to different bootloader documentation. This video is good for visualizing how the bootloader actually works and what happens in the background.

    It is also possible to upload a new bootloader, a new softdevice, or a new bootloaer+softdevice via the nRFToolbox for Android or IOS or via MCP. You can create image files for such uploads as described here. To be able to upload a different softdevice you must disable softdevice protection before you originally flash the softdevice. This is done in e.g. nRFgo Studio with the following steps:

    1. Press "Erase All" button to erase all flash contents from the nRF51
    2. Select the "Program Softdevice" tab
    3. Browse to the desired softdevice hex file
    4. Deselect "Enable Softdevice protection"
    5. Program the softdevice
    6. program a bootloader: select the "Program bootloader" tab, browse to the bootloader hex file, press "Program". You must open a bootloader project in e.g. nRF51 SDK 9.0.0 and compile it in order to make the bootloader hex file. Then you can browse to the bootloader hex file in e.g. \nRF51_SDK_9.0.0_2e23562\examples\dfu\bootloader\pca10028\dual_bank_ble_s110\arm5_no_packs_build if you are building a bootloader for S110 softdevice 8.x.x
    7. create a image file that contains an application in order to upload application, softdevice+bootloader image file (zip file) to upload softdevice+bootloader, etc, as described here
    8. upload the image file to the device via nRF Toolbox for IOS, Android or Windows phone, or the MCP for PC

    image description

  • Thank you! I learned the thread and found that there are 2 method:

    1. Merge the 3 .hex files and then program. Should I use nRFjprog and mergehex to do these jobs? I installed nrf5x-tools, but didn't found these two tools.

    2. I also can program these 3 files seperately. And the order is sd-->bootloader-->app. I tried this, but it doesn't work. Is app_valid_setting_apply.hex need? And nrfgoStudio can do these work?

Reply Children
No Data
Related