Nrf52833 stays in bootloader mode. Getting error No firmware to activate.

Hi Everyone,

                 I am using NRF52833 in my project and have implemented OTA on it. OTA works fine. One issue is when I program the device for the 1st time using the merged hex file, the device stays in bootloader mode. It does not jump to application even though the merge file includes the application file.

I am using merge hex to combine the softdevice, bootloader and application file. I give the following script  to generate merged hex file:-

@echo off

:: # Check to make sure nrfjprog is installed before moving on
WHERE >nul 2>nul nrfjprog
IF %ERRORLEVEL% NEQ 0 (
ECHO "nrfjprog was not found in PATH, please install using windows installed as found on nordicsemi.com"
goto :end
)
WHERE >nul 2>nul mergehex
IF %ERRORLEVEL% NEQ 0 (
ECHO "mergehex was not found in PATH, please install using windows installed as found on nordicsemi.com"
goto :end
)

SET S140=s140_nrf52_7.2.0_softdevice.hex
SET BOOTLOADER=bootloader.hex
SET APPLICATION=application.hex

echo "## Looking to make sure %S140% exists"
if not exist %S140% (
echo "#### s140 hex file does not exist! Make sure the softdevice is in the same folder as this script!"
goto :end
)
echo.

echo "## Looking to make sure %BOOTLOADER% exists"
if not exist %BOOTLOADER% (
echo "#### Bootloader hex file does not exist! Please make sure its compiled, copied, and renamed into this folder!"
goto :end
)
echo.

echo "## Looking to make sure APPLICATION% exists"
if not exist %APPLICATION% (
echo "#### APPLICATION hex file does not exist! Please make sure its compiled, copied, and renamed into this folder!"
goto :end
)
echo.

mergehex -v

echo "## Merging S140 and bootloader, then flashing it to nRF52-DK; make sure the DK is powered on and connected to the PC"
mergehex -m %S140% %BOOTLOADER% %APPLICATION% -o merged_SD_bootloader.hex
nrfjprog --program merged_SD_bootloader.hex --chiperase
echo.

echo "## Please power cycle the DK and then with nRF Connect, make sure the board is in bootloader mode and ADV as DfuTarg"
echo.

:end
pause

After running this script I load the generated merged hex file into device. Now what I have observed is the device stays in the bootloader mode. It does not automatically go into application mode. 

What changes are needed to do so that after flashing this merged hex file, the device will come out of bootloader mode and start running the application. Is something wrong with my merge hex method?

I am getting the following error:-

00> <info> app: Inside main
00> 
00> <info> nrf_dfu_settings: Old settings page detected. Upgrading info.
00> 
00> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
00> 
00> <info> app: No firmware to activate.
00> 
00> <warning> app: Boot validation failed. App is invalid.
00> 
00> <info> nrf_bootloader_wdt: WDT is not enabled
00> 
00> <info> app: Entering DFU mode.

 

I saw many threads on it but could not find the link to what I am missing. Please help. 

Thanks & Regards,

Snehal.

  • Hi Snehal,

    I will look into your case.

    While I have a look, could you post links to the other threads you saw on this?

    Regards,
    Sigurd Hellesvik

  • Hi,

    Due to the vacation, we have limited resources in our support team.
    I will look more into your case, but it might take more time than usual.

    Thank you for your patience.

    Regards,
    Sigurd Hellesvik

  • Hi Snehal,

    Now what I have observed is the device stays in the bootloader mode. It does not automatically go into application mode. 

    Is your application booted if you reset the device manually?

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    Did you eventually solved the issue? I'm running into the same problem, but so far I haven't found any solution for this problem.

    I'm using a non-modified version of the DFU scure-bootloader example for the PCA10100 with the SDK16 in a nrf52833 Chip. Here a log of the RTT Viewer:

     0> <info> app: Inside main
     0> <debug> app: In nrf_bootloader_init
     0> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
     0> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
     0> <debug> nrf_dfu_settings: Using settings page.
     0> <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
     0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
     0> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
     0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
     0> <debug> app: Enter nrf_bootloader_fw_activate
     0> <info> app: No firmware to activate.
     0> <debug> nrf_dfu_validation: CRC check of app failed. Return 1
     0> <debug> app: App is valid
     0> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
     0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
     0> <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
     0> <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0
    

  • Hi,

    Reading your log, I think your issue is different than the one in this case.

    Can you please create a new ticket explaining your issue?
    Also include link to this case for reference.

    Thanks!

    Regards,
    Sigurd Hellesvik

Related