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

Thread Secure DFU compatibility with bootloader

We have Thread devices with bootloader and applicaion based on nRF5 SDK for Thread and Zigbee 2.0, and now we are migrating to SDK 4.1.
As it's stated in documentation the bootloader cannot be updated with Thread Secure DFU, so we need to stay with bootloadter based on SDK 2.0.
Is bootloader from SDK 2.0 compatible with applicatons running Thread Secure DFU based on SDK 4.1 (and newer in the future)?

Parents Reply Children
  • Hi,

    Thank you for the answer.

    I've verified it on my setup and indeed it looks that compatibility is broken between SDK 2.0 and SDK 4.1.

    Test procedure:
    1. Flash loader and application based on SDK 2.0
    2. Perform DFU of application only, based on SDK 4.1
    3. Perform next DFU of application only, based on SDK 4.1

    On step 3. I get an error like below:

    [00:00:00.041,346] <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    [00:00:00.041,474] <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    [00:00:00.041,858] <debug> nrf_dfu_settings: Using settings page.
    [00:00:00.042,114] <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    [00:00:00.043,010] <warning> nrf_dfu_settings: Settings write aborted since it tries writing to forbidden settings.
    [00:00:00.043,138] <error> nrf_dfu_settings: nrf_dfu_settings_write_and_backup() failed with error: F

    I see there is a NRF_DFU_SETTINGS_COMPATIBILITY_MODE but it is active only when NRF_DFU_IN_APP is disabled. The full condition:

    if (NRF_DFU_SETTINGS_COMPATIBILITY_MODE && !NRF_DFU_IN_APP && (s_dfu_settings.settings_version == 1))

    ...so I've even removed !NRF_DFU_IN_APP from that condition to force settings migration:

    if (NRF_DFU_SETTINGS_COMPATIBILITY_MODE && (s_dfu_settings.settings_version == 1))

    but it did not help:

    [00:00:00.125,832] <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    [00:00:00.125,960] <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    [00:00:00.126,344] <debug> nrf_dfu_settings: Using settings page.
    [00:00:00.126,600] <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    [00:00:00.126,728] <info> nrf_dfu_settings: Old settings page detected. Upgrading info.
    [00:00:00.127,368] <warning> nrf_dfu_settings: Settings write aborted since it tries writing to forbidden settings.
    [00:00:00.127,496] <error> nrf_dfu_settings: nrf_dfu_settings_write_and_backup() failed with error: F

    Regards,
    Krzysztof

Related