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

App DFU support

Hello,

I'm trying to implement a DFU support into the application, and in order to learn how it works, I'm following the steps at the page developer.nordicsemi.com/.../a00066.html.

The problem is that I cannot switch into the DFU mode. My PCA10028 board ends up in an unresponsive state and I have to reset it.

This is the list of the steps:

  1. Built the app experiemental_ble_app_hrs_s110_with_dfu_pca10028 using gcc.

  2. Built a bootloader and flashed both 7.1 SoftDevice and Bootloader to the device using nrRFGo Studio.

  3. Opened MCP 3.9 and discovered DFU Target. I was able successfully upload the
    experiemental_ble_app_hrs_s110_with_dfu_pca10028 hex file, and then discovered Nordic_HRM device in MCP, which means that my bootloader and the app are fine.

  4. Then I followed steps 2 to 7 from the web page mentioned above: wrote 01-00 to cccd, then 01-04 to DFU Control Point. At this point MCP got disconnected as expected, but I see no DFU Target ... actually I see no device at all ( I pressed "back" and "start discovery" buttons to initiate discovery).

It looks like I'm missing some critical steps that are not in the instructions.

Please help, thanks.

UPD: the problem seems is related to the experiemental_ble_app_hrs_s110_with_dfu_pca10028 built with GCC. If I build it using Keil, DFU works as described.

  • @Pektusin: You were correct. It's the issue with the assembly code for branching and interrupt clearing for gcc in SDK v7.x (bootloader_util_gcc) is not updated to work with the experiemental_ble_app_hrs_s110_with_dfu_pca10028 project. (It's made for the bootloader firmware)

    We have updated the code in SDK v8.1 that should fix the issue. Could you please try with gcc compile with the example from SDk v8.1 ? Note that you would need to use S110 v8.0 also.

    You can also try to copy what we do in bootloader_util.c in SDK v8.1 to implement in the example in SDK v7.x. I think it should work.

  • Thanks for the response, I see the changes in SDK8.1 and it looks stright forward to back port them to the 7.1 bootloader.

    As a side question, the Beacon Kit comes with DFU and bootloader (nRF51822_beacon_firmware_1.1.0.msi), but some of the files are altered from the original ones in SDK7.1, i.e. dfu_app_handler_mod.c, dfu_dual_bank_mod.c, dfu_transport_ble_mod.c.

    Is it compatible? What was the reason for the changes? Would you recommend to port the changes to the SDK bootloader?

    Thanks!

  • @Pektusin: The modification added mainly to adapt to the beacon platform (GPIO changes) and also some minor bug fixes that was implemented on SDK v7.2. The beacon bootloader based on SDK v7.1. You don't have to port the change to SDK v8.1, it should work fine.

  • an update:

    I copied asm code from SDK8.1 bootloader_util.c bootloader_util_reset() to SDK7.1 bootloader_util_gcc.c StartApplication() and it made experiemental_ble_app_hrs_s110_with_dfu_pca10028 working with DFU. Thanks!

Related