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

Bootloader not working

Hi,

I am using example bootloader from Nordic.

SD7.0 SDK6.1 S110 2nd rev chip 51822 IROM 0x3C000 Size 0x4000 Optimization Level3

The implementation is based on setting gpregret from application to enter dfu mode which works fine. If gpregret is not set DfuTarg is not going to be advertised in any time.

In the initial step there is an app and bootloader exists. However, when I try to upload bootloader itself from OTA DfuTarg is not advertised from the bootloader.

question1- (silly question) uploading a bootloader when app and bootloader exists, clears the app and old bootloader, right?

question2- I tried erasing the board and and flashing only the bootloader app from Nrfgo, where I noticed that DfuTarg is not advertised when the app is not there. From this point I decided to build a distrubution package as I know my bootloader is not working when the app code is not there. Am I in the right way?

question3- In forums I could not find any explanation for building a valid app_valid_setting_apply.hex file. Any one can please link for this?

question4- what will be the cause reason why DfuTarg is not advertised when there is no app in any region? From debugging on level 0 I noticed that below line is called. What I need to check at this point? bootloader_app_start(DFU_BANK_0_REGION_START);

Many thanks,

Parents
  • Hi Zubi,

    Q1. No, we only clear the application when updating the softdevice.

    Q2. If you flash the softdevice, then the bootloader. The bootloader should work (advertising as DFUTarg) even there is no application flashed.

    Q3. app_valid_setting_apply.hex is only a hack so that we can flash the application using SWD interface, not by via the bootloader. It simply sets the app valid bit in the bootloader setting page to be 1 and CRC check to 0.

    Q4. The stock example of the bootloader in the SDK should work without the app. There must be smth wrong here. Also it should not run to bootloader_app_start() because the check for bootloader_app_is_valid() should return false.

    I suggest you to go to debug mode and check why in your case bootloader_app_is_valid() return true.

Reply
  • Hi Zubi,

    Q1. No, we only clear the application when updating the softdevice.

    Q2. If you flash the softdevice, then the bootloader. The bootloader should work (advertising as DFUTarg) even there is no application flashed.

    Q3. app_valid_setting_apply.hex is only a hack so that we can flash the application using SWD interface, not by via the bootloader. It simply sets the app valid bit in the bootloader setting page to be 1 and CRC check to 0.

    Q4. The stock example of the bootloader in the SDK should work without the app. There must be smth wrong here. Also it should not run to bootloader_app_start() because the check for bootloader_app_is_valid() should return false.

    I suggest you to go to debug mode and check why in your case bootloader_app_is_valid() return true.

Children
No Data
Related