when i flash the device,there is error,where is the probelm?

I buid the procedure in VS for vscode. when i try to flash the device,there is error,i don't know where problem is.

The output in terminal is as follow:

 *  正在执行任务: nRF Connect: Flash: central_uart/nrf52833 (active) 

Flashing nrf52833 to 685433352
west flash -d l:\vscode\NCS\central_uart\central_uart\nrf52833 --skip-rebuild -r nrfjprog --dev-id 685433352

-- west flash: using runner nrfjprog
-- runners.nrfjprog: Flashing file: l:\vscode\NCS\central_uart\central_uart\nrf52833\zephyr\zephyr.hex
Parsing image file.
Verifying programming.
ERROR: The JLinkARM DLL timed out while communicating to the J-Link probe.
ERROR: If the error condition persists, 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 35: nrfjprog --program 'l:\vscode\NCS\central_uart\central_uart\nrf52833\zephyr\zephyr.hex' --sectoranduicrerase --verify -f NRF52 --snr 685433352

 *  终端进程已终止,退出代码: 35。 
 *  终端将被任务重用,按任意键关闭。

can you help me?

  • We need you to run "west flash -d l:\vscode\NCS\central_uart\central_uart\nrf52833 --skip-rebuild -r nrfjprog --dev-id 685433352 --log" and share the output.

    My first guess would be that APPROTECT is enabled after the device is flashed and prevents the debugger from reading back the FW image during the 'verification' step.

    1. Have you enabled APPROTECT?

    2. Does your application run as expected?
  • yes,I try as what you said.There is a error.

    The terminal is showed as follow.

    PS L:\vscode\NCS\central_uart> west flash -d l:\vscode\NCS\central_uart\central_uart\nrf52833 --skip-rebuild -r nrfjprog --dev-id 685433352 --log
    west : 无法将“west”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
    所在位置 行:1 字符: 1
    + west flash -d l:\vscode\NCS\central_uart\central_uart\nrf52833 --skip ...
    + ~~~~
        + CategoryInfo          : ObjectNotFound: (west:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    When i flash the device directly,it success.

     *  正在执行任务: nRF Connect: Flash: central_uart/nrf52833 (active) 
    
    Flashing nrf52833 to 685433352
    west flash -d l:\vscode\NCS\central_uart\central_uart\nrf52833 --skip-rebuild -r nrfjprog --dev-id 685433352 --erase
    
    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: mass erase requested
    -- runners.nrfjprog: Flashing file: l:\vscode\NCS\central_uart\central_uart\nrf52833\zephyr\zephyr.hex
    Parsing image file.
    Verifying programming.
    Verified OK.
    Enabling pin reset.
    Applying pin reset.
    -- runners.nrfjprog: Board with serial number 685433352 flashed successfully.
     *  终端将被任务重用,按任意键关闭。 
    "My first guess would be that APPROTECT is enabled after the device is flashed and prevents the debugger from reading back the FW image during the 'verification' step.",it may be this problem.thanks!

  • That does match well with APPROTECT as you need to erase UICR and flash before you can write new data to flash or UICR.

  • ok,thanks!If the error exist,i will reflash the device.

Related