nrfjprog program every second time didn't start the application

Hi

When I use the nrfjprog with the command line:

nrfjprog --recover

nrfjprog --eraseall

nrfjprog --program testcode.hex

nrfjprog --rbp ALL

The application is starting and the code running.

If I do the same again (with the same hex or a newer one) the nrf remains in the bootloader.

The only solution is to do it again, every second time this bug is happening, why? What is the solution for this?

Regards, Dominik

  • this code works now:

    @ECHO off
    
    REM nrfjprog --log
    
    set "HEX_FILE=testfile.hex"
    
    echo **********************************************************************
    echo "Recover and disable the read back protection"
    echo ********************************************************************** 
    nrfjprog --recover 
    
    echo ********************************************************************** 
    echo "%HEX_FILE%"
    echo ********************************************************************** 
    
    echo **********************************************************************
    echo "Program and reset the Device
    echo ********************************************************************** 
    nrfjprog --reset --program %HEX_FILE%
    
    echo **********************************************************************
    echo "Verify the device
    echo ********************************************************************** 
    nrfjprog --verify --fast %HEX_FILE%
    
    echo **********************************************************************
    echo "enable the readback protection"
    echo ********************************************************************** 
    nrfjprog --rbp ALL
    
    pause

Related