Programmer can't read chip information after i download firmware with VSCode

Hi,

Programmer can't read chip information after i download firmware with VSCode.

Before download, Programmer can read chip information.

16:24:18.572
Selecting device with the serial number 001050050051
16:24:21.640
Error: Failed with exit code 1. Failed to device info one or more devices: * 1050050051: [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1), code: Generic. Message: Operation device-info failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1).
16:24:21.640
Selected device with the serial number 001050050051
16:24:21.641
Using nrfutil device to communicate with target via JLink
16:24:24.848
Reading readback protection status for Application core
16:24:24.848
Failed "reading readback protection status for application core". Error: code: 1, description: Generic, message: Batch task protection-get failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1)
16:24:24.990
Error: Failed with exit code 1. One or more batch tasks failed: - [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1), code: Generic. Message: Batch task protection-get failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1).
16:24:24.990
Error: Failed with exit code 1. One or more batch tasks failed: - [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1), code: Generic. Message: Batch task protection-get failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1).
Tool : Visual studio code(recently version)
Example code : Bluetooth LE Uart service
Downloding tool : nrf5340dk board
Target Board : Custom board(nrf52832)
Thanks for helping
Parents
  • Hello,

    The error "Failed to write DebugPort register 2" indicates that the J-Link debugger cannot properly communicate with the debug port on your nRF52832 chip after flashing.

    It seems like device can't get connected to debugger. You can try to do recover and resetall by using nrfjrprog command.

    nrfjprog --recover 
    nrfjprog --resetall

    Also you need to make sure custom board is properly powered. 

Reply
  • Hello,

    The error "Failed to write DebugPort register 2" indicates that the J-Link debugger cannot properly communicate with the debug port on your nRF52832 chip after flashing.

    It seems like device can't get connected to debugger. You can try to do recover and resetall by using nrfjrprog command.

    nrfjprog --recover 
    nrfjprog --resetall

    Also you need to make sure custom board is properly powered. 

Children
Related