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

Bootloader requires 3 resets to run application

Hello all,

I've run into a weird problem that hopefully someone has a clue.

My environment:
- PCA10040A, nRF52832
- sdk 17.0
- softdevice s132_nrf52_7.0.1_softdevice.hex
- using a buttonless BLE bootloader
- building with Segger SES

The problem:

I build a hex file containing softdevice, boot settings, bootloader and application.  This file is flashed to the dev kit with the following command:
    - nrfjprog --chiperase --reset --verify --program myfile.hex
    
When the flashing finishes, the target runs the bootloader rather than my application.  I know this from the advertising packets.  I power-cycle the dev kit; again the bootloader is running.  I power-cycle the dev kit a second time, now the application is running!  From this point on, all resets result in the application running.

To summarize, after flashing, the system stays in the bootloader for 2 resets, the 3rd reset lets the application run.

I'm pretty sure that the application and boot settings are correct because after the 3rd reset, the bootloader is happy to start the application after resets.

Another curious data point is that I see the same behavior after a OTA update; the application only runs after the 3rd reset.

I'd appreciate any insights into why this is happening.

TIA,
Richard

Parents Reply Children
Related