unable to flash the code in BT 40

C:\Users\lnaik\Desktop\New_develop>nrfjprog --recover --coprocessor CP_NETWORK
Recovering device. This operation might take 30s.
[error] [ Client] - Encountered error -21: Command recover executed for 14 milliseconds with result -21
[error] [ Worker] - Eraseprotect is enabled and readback protection setting is ALL, can't recover device.
ERROR: Recover failed. Please make sure that the correct device family is given
ERROR: and try again.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed. 
i think this is the major issue  i am facing could not able to recovery the board 

and i am not able get the log details with --log 

i had created the before also one ticket related to this but it has closed with our resolving the issue 
i hope you will give quick replay 

  • Hmm, recover should have worked even if erase protection is enabled.

    Can you try erase all and then try recover? 

    > nrfjprog --eraseall --coprocessor CP_NETWORK

    > nrfjprog --recover --coprocessor CP_NETWORK

  • -- west flash: using runner nrfjprog
    -- runners.nrfjprog: Flashing file: c:\Users\lnaik\Desktop\New_develop\build_1\zephyr\merged.hex
    [error] [ Worker] - Encountered unexpected debug port ID 4, expected 6
    [error] [ Client] - Encountered error -5: Command select_coprocessor executed for 22 milliseconds with result -5
    ERROR: Failed when selecting coprocessor APPLICATION
    ERROR: The --family option given with the command (or the default from
    ERROR: nrfjprog.ini) does not match the device connected.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    FATAL ERROR: command exited with status 18: nrfjprog --program 'c:\Users\lnaik\Desktop\New_develop\build_1\zephyr\merged.hex' --sectorerase --verify -f NRF53 --coprocessor CP_APPLICATION --snr 1050060012
    now i am getting this error 

  • -- west flash: using runner nrfjprog
    -- runners.nrfjprog: Flashing file: c:\Users\lnaik\Desktop\New_develop\build_1\zephyr\merged.hex
    [error] [ Worker] - Encountered unexpected debug port ID 4, expected 6
    [error] [ Client] - Encountered error -5: Command select_coprocessor executed for 22 milliseconds with result -5
    ERROR: Failed when selecting coprocessor APPLICATION
    ERROR: The --family option given with the command (or the default from
    ERROR: nrfjprog.ini) does not match the device connected.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    FATAL ERROR: command exited with status 18: nrfjprog --program 'c:\Users\lnaik\Desktop\New_develop\build_1\zephyr\merged.hex' --sectorerase --verify -f NRF53 --coprocessor CP_APPLICATION --snr 1050060012 can you check this error

  • C:\Users\lnaik\Desktop\New_develop>nrfjprog --eraseall --coprocessor CP_NETWORK
    [error] [ nRFXX] - Device does not have an ARM debug port.
    [error] [ Client] - Encountered error -3: Command enable_coprocessor executed for 0 milliseconds with result -3
    ERROR: NETWORK coprocessor is invalid on UNKNOWN family devices[error] [ nRFXX] - Device does not have an ARM debug port.

    [error] [ Worker] - NETWORK is not a valid coprocessor for the device
    ERROR: An invalid argument was provided. Use --help for a list of valid
    ERROR: arguments.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.

    C:\Users\lnaik\Desktop\New_develop>nrfjprog --recover --coprocessor CP_NETWORK
    [error] [ nRFXX] - Device does not have an ARM debug port.
    [error] [ nRFXX] - Device does not have an ARM debug port.
    [error] [ Client] - Encountered error -3: Command enable_coprocessor executed for 15 milliseconds with result -3
    ERROR: NETWORK coprocessor is invalid on UNKNOWN family devices[error] [ Worker] - NETWORK is not a valid coprocessor for the device

    ERROR: An invalid argument was provided. Use --help for a list of valid
    ERROR: arguments.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed. can you check these out please 



  • Are you sure that there is enough power supplied to the chip? Did you try it on any other chip apart from this one? If not can you please try this. 

    It has to be either not enough power or some error/damage with the chip. Which version of nrfjprog are you using?

Related