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

Invalid Application after SoftDevice DFU

Hi,

 

I am using nRF52840, S140 V7.0.1.

I am using Secure Serial Bootloader and able to do DFU of Application.

 

Now I am trying to do the same for generating SoftDevice package.

Generate SoftDevice DFU package

nrfutil pkg generate --hw-version 52 --softdevice s140_nrf52_7.0.1_softdevice.hex --sd-req 0xCA --key-file private.key SoftDevice_V2_package.zip

 

I am trying to do SoftDevice DFU using below commands.

nrfutil dfu serial -pkg SoftDevice_V2_package.zip -p COM8 -b 115200 -fc 0

 

SoftDevice DFU is success. As per below link I am trying to understand the statement about Application invalidation.

 

“The application is retained during this process, but it might be invalid because of API changes in the SoftDevice, or because the new SoftDevice has a different size than the existing one.

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_bootloader_dfu_banks.html&cp=6_1_3_5_1_2

 

1) Even after invalidating application, whether application will keep running. My application is running even after SoftDevice DFU. Does it mean application is not invalidated.

2) Whether we can't do application DFU after application getting invalidated.

3) How about version check. I did not give any version as part of command.

4) Whether the commands I used to generate package and doing SoftDevice DFU are fine. Please let me know if I miss anything.

 

Thanks & Regards

Vishnu Beema

  • Hi Vishnu,

    1) Even after invalidating application, whether application will keep running. My application is running even after SoftDevice DFU. Does it mean application is not invalidated.

    If the SoftDevice is of a different major version, then the SoftDevice and application will not be API compatible, and the application will be invalidated. If the API is compatible, the application will not be invalidated. In this case, it is not invalidated.

    2) Whether we can't do application DFU after application getting invalidated.

    If the application is invalidated the only way to get it running is to upgrade to a new application over DFU

    3) How about version check. I did not give any version as part of command.

    Version checking is used for application and bootloader, but not for SoftDevice. There is no option to add version number for the SoftDevice (though it has not been consistent for all SDK versions). This is not needed since the SoftDevice ID is always used.

    4) Whether the commands I used to generate package and doing SoftDevice DFU are fine. Please let me know if I miss anything.

    It should be fine. But just remember that if you update to a new major SoftDevice version you are forced to update the bootloader at the same time. For the application, it follows the earlier discussion.

    Einar

  • Thank you for your inputs.

    1) You mentioned even bootloader to be updated. Can you please confirm. In below link no where it's mentioned to update bootloader when SoftDevice is updated other than application.

    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_bootloader_dfu_banks.html&cp=6_1_3_5_1_2

    2) Currently I am using nRF52840, S140 V7.0.1. So do you mean 7 is major version.

    3) What about other numbers within 7.0.1. Whether they are minor and intermediate.

    In release note I could not find the details about version number.

    Thanks & Regards

    Vishnu Beema

  • Hi Vishnu,

    beemavishnu said:

    1) You mentioned even bootloader to be updated. Can you please confirm. In below link no where it's mentioned to update bootloader when SoftDevice is updated other than application.

    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_bootloader_dfu_banks.html&cp=6_1_3_5_1_2

    The exact statement that SoftDevice updates require a update of the bootloader if the bootloader depends on the SoftDevice (which BLE bootloader do) an the SoftDevice API has changed it not found in the documentation as far as I know, though there are statements such as "If the bootloader depends on Softdevice (see Bootloader dependencies) then package that contains Softdevice update may contain the bootloader." here. But the fact remains that you cannot update to a SoftDevice which is incompatible with the current bootloader without also updating the bootloader.

    beemavishnu said:
    2) Currently I am using nRF52840, S140 V7.0.1. So do you mean 7 is major version.

    Yes. And the aim is that all major versions of the SfotDEvice should have the same API. But if you later move to a 8.x.x version this will have a different API, braking compatibility, requiring an update of the bootloader and application as well as the SoftDevice.

    beemavishnu said:
    3) What about other numbers within 7.0.1. Whether they are minor and intermediate.

    If you have version 7.0.1, then 7 is the major version, 0 is the minor version and 1 is the patch version (Major.Minor.Patch). Major versions typically break API. Minor versions can add new API but not break existing API. Patch versions are typically small fixes with no API differences.

    Br,

    Einar

Related