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

Application does not start beside DFU bootloader

Hy everybody,

I'm trying to implement DFU bootloader in our custom board, starting from the "bootloader_secure_example", where I just changed leds and button pins in order to adapt them to our board. I successful flashed the soft device and the bootloader, merged with the bootloader settings, and I can perform a dfu firmware update with the nRF Connect, or nRF Toolbox, BLE app but, after the chip reset, nothing happens! No app advertising nor DFU_Targ. If I manually reset the board, pulling down the proper button, it returns to bootloader mode advertising with the DFU_Targ name. Even if I flash the firmware directly with keyl I see the same behavior.

There are no problems if I use just SD+APP (without bootloader).

I suppose the problem could be something related to rom/ram or bootloader settings.

Here are our settings:

SoftDevice: s13_nrf52_4.0.2
SDK: nRF5_SDK_13.1.0_7ca7556
Chip: nRF52832

Bootloader

IROM1 start: 0x78000
IROM1 size: 0x6000
IRAM1 start: 0x20002060
IRAM1 size: 0xDA70

Application

IROM1 start: 0x1F000
IROM1 size: 0x56000
IRAM1 start: 0x20003800
IRAM1 size: 0xC800

Bootloader settings script

nrfutil settings generate --family NRF52 --application-version 4 --bootloader-version 1 --bl-settings-version 1 bootloader_settings.hex

Bootloader DFU Settings:
* File:                 bootloader_settings.hex
* Family:               nRF52
* CRC:                  0xC90C83B3
* Settings Version:     0x00000001 (1)
* App Version:          0x00000004 (4)
* Bootloader Version:   0x00000001 (1)
* Bank Layout:          0x00000000
* Current Bank:         0x00000000
* Application Size:     0x00000000 (0 bytes)
* Application CRC:      0x00000000
* Bank0 Bank Code:      0x00000001

Merged hex files

mergehex --merge bootloader_settings.hex Bootloader.hex --output Bootloader_with_settings.hex

I tried also to set the variable m_dfu_settings_buffer in the file nrf_dfu_settings.c in this way:

uint8_t  m_dfu_settings_buffer[CODE_PAGE_SIZE] __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS)))
                                                   __attribute__((used)) = {NRF_DFU_BANK_VALID_APP};

but when I try to merge bootloader and bootloader-settings .hex files it returns the error

ERROR: The hex files cannot be merged since there are conflicts.

Any suggestion?

Thanks in advance.

Massimo

Related