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

Secure boot-loader fails to start application on power reset

Below are the details of my setup configuration:

  • SDK Version: 11.0.0 (with changes corresponding to hardware)
  • Soft-device: s130_nrf51_2.0.0
  • Boot-loader: nrf51422_xxac_s130.hex => Generated from SDK version 12.1.0

I followed all the steps mentioned under blog https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader

I am getting success till step D and all the way till sub-step D4.

So I have a DFU .zip package that successfully upgrades firmware securely and application runs normally with correct broadcast/scan data.

When I power reset device (or unplug J-Link and plug it again), hardware stops broadcasting and I can not see my device in the scan list. Also application fails to start.

Need some suggestions on what could have gone wrong here!

Thanks,

Rahul

Parents
  • Hello Rahul,

    Are you using an application from a different SDK than your bootloader? If so, are they using different softdevices? Or are you trying to update from a bootloader in SDK11 to SDK12.1.0? I am a bit confused by the statement:

     

    • SDK Version: 11.0.0 (with changes corresponding to hardware)
    • Soft-device: s130_nrf51_2.0.0
    • Boot-loader: nrf51422_xxac_s130.hex => Generated from SDK version 12.1.0

     How do you determine that the application is not starting? Lack of advertisements? Perhaps the application catches an error in an APP_ERROR_CHECK(). You are using a quite old SDK, but have you tried to monitor any logging? Try to define DEBUG in the preprocessor definitions in your application, to make sure that the logging is finished before it shuts down in case of an error. 

    I have not dug into what the exact issue may be, but perhaps you can explain what SDK version you are using, and what you are using from SDK11, what you are using from SDK12.1.0, what you are trying to update, and how you generated your DFU image. What nrfutil command did you use?

    Best regards,

    Edvin

  • I was using SDK version 11.0.0 for Application as well as boot-loader. I wanted to add a signature to secure DFU process. SDK version 11.0.0 does not support secure DFU, so I generated boot-loader hex file from SDK version 12.1.0 as this version supports secure DFU.

    I changed only boot-loader from 11.0.0. to 12.1.0 and continued application using 11.0.0

    I used below command to generate .zip DFU package:

    nrfutil.exe pkg generate --application application.hex --application-version 0xFFFFFFFF --hw-version 51 --sd-req 0x80 --key-file private.key %file_name%.zip


    I used Soft Device s130_nrf51_2.0.0_softdevice.hex

    I  hope this answers most of your questions. If you find any issues in the steps I followed or you have more queries regarding setup, do revert.

    Thanks

    Rahul

Reply
  • I was using SDK version 11.0.0 for Application as well as boot-loader. I wanted to add a signature to secure DFU process. SDK version 11.0.0 does not support secure DFU, so I generated boot-loader hex file from SDK version 12.1.0 as this version supports secure DFU.

    I changed only boot-loader from 11.0.0. to 12.1.0 and continued application using 11.0.0

    I used below command to generate .zip DFU package:

    nrfutil.exe pkg generate --application application.hex --application-version 0xFFFFFFFF --hw-version 51 --sd-req 0x80 --key-file private.key %file_name%.zip


    I used Soft Device s130_nrf51_2.0.0_softdevice.hex

    I  hope this answers most of your questions. If you find any issues in the steps I followed or you have more queries regarding setup, do revert.

    Thanks

    Rahul

Children
  • But is your application capable of using that softdevice? You need to at least change the headers so that the softdevice in the flash is the same version as the softdevice headers in your SDK. 

    SDK12.1.0 uses Softdevice S130v2.0.1, while SDK11.0.0 uses Softdevice S130v2.0.0. It is a mismatch. I suggest you port your application to SDK 12.1.0, so that you know that your application matches the softdevice from your bootloader.

    At least (bare minimum) change the softdevice headers used in your application to S130v2.0.1. 

    Then, if it still doesn't work, try to debug. Is the application running? You will run into some issues when you try to debug, because debugging will typically upload the build files. Usually I suggest customers to use SES (Segger Embedded Studio), because it has the option "Attach debugger" which will not flash anything, just assume that the FW is already flashed. SES is not supported in these old SDKs. See if you can do something similar in the IDE that you are using.

  • Hi Edvin

    I updated SDK from 11.0.0 to 12.1.0 and this has fixed issue observed on power reset.

    Thanks.

Related