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

bootloader cannot start app

HW: BMD-350

SDK: nRF5_SDK_12.0.0_12f24da

Sample Code: examples\dfu\bootloader_secure\pca10040_debug

I have my own firmware app.

Problem:

If I use Keil to flash bootloader, it can start the app. If I power off and then on, it cannot and get stuck at nrf_bootloader_app_start_impl.

Parents
  • How do you know that it's stuck at nrf_bootloader_app_start_impl() ? if you simply couldn't step through that when debugging then it's normal. That function branch to application, you can't step through that, or you can but the debugger woudn't know the code in the application.

    What you can do is to try putting a notification when your application start, for example turn on an LED. Just to check if it's branched to the application or not, or you can use debugger in your application to wait for the bootloader branch to the application.

    I don't see any reason why the bootloader can't branch to application when power up but can when doing reset.

    Could you check if it's related to any peripherals on your board that can't bootup quickly and may have a problem ?

    You can try to comment out part of your code, as you can see that normal application can boot without problem.

Reply
  • How do you know that it's stuck at nrf_bootloader_app_start_impl() ? if you simply couldn't step through that when debugging then it's normal. That function branch to application, you can't step through that, or you can but the debugger woudn't know the code in the application.

    What you can do is to try putting a notification when your application start, for example turn on an LED. Just to check if it's branched to the application or not, or you can use debugger in your application to wait for the bootloader branch to the application.

    I don't see any reason why the bootloader can't branch to application when power up but can when doing reset.

    Could you check if it's related to any peripherals on your board that can't bootup quickly and may have a problem ?

    You can try to comment out part of your code, as you can see that normal application can boot without problem.

Children
Related