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

DFU example not working

Hi,

Recently we upgraded from NRF52832 to NRF52840, and as the Development seems to come to an end, one of the last features we need is OTA capability.

currently I am trying to Implement DFU on my application, but I am struggeling.

I downloaded the latest SDK and tried to compile \examples\dfu\secure_bootloader\pca10056_ble project.

after compiling I flashed softdevice (make Flash_Softdevice) and then flashed the bootlader (make Flash) but my board wont advertise.

next step was to try one of the precompiled examples, I successfuly flashed sd_s140_bootloader_buttonless_with_setting_page_dfu_secure_ble_debug_without_bonds.hex, and it worked! I could see the DFUtarg advertising, then I tried to flash the softdevice and bootloader_secure_ble_debug_without_bonds_s140.hex seperately, and again, it did not advertise.

what am I doing wrong?

thanks in advance,

Jonas

Parents
  • In SDK 15.3 the bootloader start address is stored in the MBR section instead of the UICR (since UICR cannot be protected by ACL/BPROT), and that causes problem in the makefile, where the nrfjprog command sectorerase is used, let me explain.

    If you take a look at the makefile of the BLE DFU bootloader examples, you can see that the bootloader is flashed first, and the bootloader start address is stored in the MBR section. Then the Softdevice is flashed onto the chip using nrfjprog and the sectorerase command. The problem here is that sectorerase command will erase the bootloader start address before flashing the MBR.

    Some solutions are:

    • Merge the Softdevice and the bootloader
    • Flash it in the following manner
      • nrfjprog -f nrf52 --program s140_nrf52_6.1.0_softdevice.hex --chiperase
      • nrfjprog -f nrf52 --program nrf52840_xxaa_s140.hex -r

    Best regards,

    Simon

Reply
  • In SDK 15.3 the bootloader start address is stored in the MBR section instead of the UICR (since UICR cannot be protected by ACL/BPROT), and that causes problem in the makefile, where the nrfjprog command sectorerase is used, let me explain.

    If you take a look at the makefile of the BLE DFU bootloader examples, you can see that the bootloader is flashed first, and the bootloader start address is stored in the MBR section. Then the Softdevice is flashed onto the chip using nrfjprog and the sectorerase command. The problem here is that sectorerase command will erase the bootloader start address before flashing the MBR.

    Some solutions are:

    • Merge the Softdevice and the bootloader
    • Flash it in the following manner
      • nrfjprog -f nrf52 --program s140_nrf52_6.1.0_softdevice.hex --chiperase
      • nrfjprog -f nrf52 --program nrf52840_xxaa_s140.hex -r

    Best regards,

    Simon

Children
Related