unable to flash on bt 40

-- west flash: rebuilding
[0/16] Performing build step for 'tfm'
ninja: no work to do.
-- west flash: using runner nrfjprog
-- runners.nrfjprog: reset after flashing requested
-- runners.nrfjprog: Flashing file: c:\Users\lnaik\Desktop\New_develop\build_1\zephyr\merged.hex
[error] [ Client] - Encountered error -104: Command erase_file executed for 133 milliseconds with result -104
[error] [ nRF53] - Failed while performing 'Erase' operation on target address 0x00000000.
-104: JLinkARM.dll ReadMemU32 detected a read error 1.
This typically indicates the read was blocked by a memory protection mechanism.
[error] [ nRF53] - Failed while erasing device. -104: JLinkARM.dll ReadMemU32 detected a read error 1.
This typically indicates the read was blocked by a memory protection mechanism.
[error] [ Worker] - JLinkARM.dll ReadMemU32 detected a read error 1.
This typically indicates the read was blocked by a memory protection mechanism.
ERROR: nrfjprog failed for an unknown reason. Run the same command again with
ERROR: argument --log, contact Nordic Semiconductor and provide the generated
ERROR: log.log file to them.
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 65: nrfjprog --program 'c:\Users\lnaik\Desktop\New_develop\build_1\zephyr\merged.hex' --sectorerase --verify -f NRF53 --coprocessor
CP_APPLICATION --snr 1050060012 
I dont kn ow what was the issue but i am unable to flash the code into the customized one can you replay quickly 

Parents
  • Hello,

    The error seems related to memory protection issue which is common error. This is likely due to APPPROTECT, SECUREAPPROTECT or ERASEPROTECT being enabled on nRF5340. 

    You can try to use west flash --recover or can use nrfjprog command to recover both application and network core.

    First, you have to recover the application core

    nrfjprog --recover --coprocessor CP_APPLICATION

    Then network core

    nrfjprog --recover --coprocessor CP_NETWORK

    Then try flashing the program.

    If you have custom device, they you have to make sure device is properly powered (Programming an external board).

    Thanks.

    BR

    Kazi


  • C:\Users\lnaik\Desktop\New_develop>nrfjprog --recover --coprocessor CP_APPLICATION
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.

    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. 
    firstly i got this kind of response i have tried to flash it again then i got below response 


    [error] [ Client] - Encountered error -102: Command enable_coprocessor executed for 170 milliseconds with result -102
    Failed to enable coprocessor with unknown error.
    [error] [ Worker] - An unknown error.
    ERROR: JLinkARM DLL reported an error. Try again. If error condition
    ERROR: persists, run the same command again with argument --log, contact Nordic
    ERROR: Semiconductor and provide the generated log.log file to them.
    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 33: nrfjprog --recover -f NRF53 --coprocessor CP_NETWORK --snr 1050060012
    now i am getting this error

Reply

  • C:\Users\lnaik\Desktop\New_develop>nrfjprog --recover --coprocessor CP_APPLICATION
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.

    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. 
    firstly i got this kind of response i have tried to flash it again then i got below response 


    [error] [ Client] - Encountered error -102: Command enable_coprocessor executed for 170 milliseconds with result -102
    Failed to enable coprocessor with unknown error.
    [error] [ Worker] - An unknown error.
    ERROR: JLinkARM DLL reported an error. Try again. If error condition
    ERROR: persists, run the same command again with argument --log, contact Nordic
    ERROR: Semiconductor and provide the generated log.log file to them.
    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 33: nrfjprog --recover -f NRF53 --coprocessor CP_NETWORK --snr 1050060012
    now i am getting this error

Children
  • 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 

Related