This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4) Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a)

Hi, I cant get access to my custom nrf52840 board after I click "Erase all" in "Programmer" in "nRF Connect for Desktop". This custom board has been working with me for at least 3 months with the same connection, but suddenly after I clicked "Erase all" last Thursday, I felt that it didnt fully erase the chip but after two seconds it popped up with error mentioned in the title and I cant access it anymore. I searched all the related issues in the forum but none helps. I can get access to the nrf52DK board if I disconnect all the connections with the custom nrf52840 board which means the jlinkob in the nrf52DK is good. Please help to figure it out. Thanks.

Basic info: 

System: Windows 10 Pro

nRF Connect for Desktop v3.7.0 Windows 64bit -> Programmer v1.4.11

nrfjprog version: 10.13.0

JLinkARM.dll version: 7.50a

Setup:

Issues:

I tried nrfjprog --recover and nrfjprog --reset but in both cases got 

ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

I tried Jlink commander also:

Best

/CJ

Parents
  • Hi

    Glad to hear we found the root cause!

    Yes, I'm afraid the erase all button will reset the device. Are you planning on using nRFConnect and an nRF52 DK for programming during mass production? If you need to erase the devices, you'll need to make sure that the UICR register is edited to support 3V (or whatever you need it to) before you reset the device. Using the "Erase and Program" button in nRFConnect Programmer should take care of this for you as long as you program the correct data onto the device, but using nrfjprog, you need to make sure that you erase and program the device before resetting, as resetting before it is programmed, will put it in this state (as described in the caution section of the Dongle tutorial I linked to).

    Best regards,

    Simon

Reply
  • Hi

    Glad to hear we found the root cause!

    Yes, I'm afraid the erase all button will reset the device. Are you planning on using nRFConnect and an nRF52 DK for programming during mass production? If you need to erase the devices, you'll need to make sure that the UICR register is edited to support 3V (or whatever you need it to) before you reset the device. Using the "Erase and Program" button in nRFConnect Programmer should take care of this for you as long as you program the correct data onto the device, but using nrfjprog, you need to make sure that you erase and program the device before resetting, as resetting before it is programmed, will put it in this state (as described in the caution section of the Dongle tutorial I linked to).

    Best regards,

    Simon

Children
  • Hi Simonr,

    Yes, we plan to use nRFConnect with DK or nrfjprog command.

    But I just tried the "Erase & Write", unfortunately the issue happened again(nRF Connect v3.7.0 - Programmer v1.4.11), seems that they reset before program? I know this issue may only happen when using High voltage mode on nrf52840 but can you report to your team to fix it?

    2021-08-17T14:01:07.249Z INFO Application data folder: C:\XXXX\pc-nrfconnect-programmer
    2021-08-17T14:01:07.479Z DEBUG App pc-nrfconnect-programmer v1.4.11 official
    2021-08-17T14:01:07.479Z DEBUG App path: C:\XXXX\pc-nrfconnect-programmer
    2021-08-17T14:01:07.479Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
    2021-08-17T14:01:07.480Z DEBUG nRFConnect path: C:\XXX\app.asar
    2021-08-17T14:01:07.480Z DEBUG HomeDir: C:\XXXX
    2021-08-17T14:01:07.480Z DEBUG TmpDir: C:\XXXX\Temp
    2021-08-17T14:01:07.508Z INFO Using nrfjprog library 10.12.1, pc-nrfjprog-js 1.7.6
    2021-08-17T14:03:26.230Z INFO Using nrfjprog to communicate with target
    2021-08-17T14:03:27.635Z INFO Using J-Link Software version 7.52
    2021-08-17T14:03:28.429Z INFO Segger serial:  682078603
    2021-08-17T14:03:28.429Z INFO Segger speed:  2000  kHz
    2021-08-17T14:03:28.429Z INFO Segger version:  J-Link OB-SAM3U128-V2-NordicSemi compiled Feb  2 2021 16:47:20
    2021-08-17T14:03:28.430Z INFO Core probed: 682078603
    2021-08-17T14:03:28.430Z INFO Core RAM: 256KiB
    2021-08-17T14:03:28.430Z INFO Core ROM: 1024KiB in pages of 4KiB
    2021-08-17T14:03:28.609Z INFO Model: NRF52840_xxAA_REV1.
    2021-08-17T14:03:29.620Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2021-08-17T14:03:36.569Z INFO Parsing HEX file:  D:\XXXX\Release\Exe\XXXX.hex
    2021-08-17T14:03:36.619Z INFO File was last modified at  4/22/2021, 9:53:25 AM
    2021-08-17T14:03:44.379Z INFO Core0: Non-volatile memory has been read. 2 non-empty memory blocks identified 
    2021-08-17T14:03:49.626Z INFO Writing image to disable app readback protection
    2021-08-17T14:03:49.626Z INFO Image path: C:\XXXX\node_modules\pc-nrfconnect-programmer\resources\firmware\disable_approtect_nrf52832.hex
    2021-08-17T14:03:55.653Z ERROR Error: Error occured when program. Errorcode: CouldNotOpenDevice (0x4)
    Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a)
    
    2021-08-17T14:03:55.654Z INFO Recovery procedure finished
    2021-08-17T14:03:55.670Z INFO Using nrfjprog to communicate with target
    2021-08-17T14:03:56.838Z ERROR Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4)
    Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a)
    
    2021-08-17T14:03:56.839Z INFO Writing procedure starts for core0
    2021-08-17T14:03:57.835Z ERROR [Debug   ] [HighLevel ] probe_init
    2021-08-17T14:03:57.835Z ERROR [Info    ] [HighLevel ] jlink_path parameter is NULL, using default JLINKARM DLL path given with or obtained in NRFJPROG_dll_open() function.
    2021-08-17T14:03:57.835Z ERROR [Info    ] [HighLevel ] Using JLINKARM DLL at C:\XXXX\JLinkARM.dll.
    2021-08-17T14:03:57.836Z ERROR [Info    ] [HighLevel ] Creating new probe
    2021-08-17T14:03:57.836Z ERROR [Info    ] [HighLevel ] Initialize new probe.
    2021-08-17T14:03:57.836Z ERROR [Debug   ] [Debug_Probe-682078603] initialize
    2021-08-17T14:03:57.836Z ERROR [Debug   ] [Debug_Probe-682078603] base_debug_probe_initialize
    2021-08-17T14:03:57.836Z ERROR [Info    ] [Debug_Probe-682078603] Copying Segger dll to temporary folder to allow a new probe connection.
    2021-08-17T14:03:57.836Z ERROR [Info    ] [Debug_Probe-682078603] Copy C:\XXXX\JLinkARM.dll -> C:\XXXX\Temp\sa4c.7nrfjprog\JLinkARM.dll
    2021-08-17T14:03:57.837Z ERROR [Info    ] [Debug_Probe-682078603] File copy done
    2021-08-17T14:03:57.837Z ERROR [Info    ] [Debug_Probe-682078603] File copy successful
    2021-08-17T14:03:57.837Z ERROR [Info    ] [Debug_Probe-682078603] Using Segger dll at C:\XXXX\Temp\sa4c.7nrfjprog\JLinkARM.dll.
    2021-08-17T14:03:57.837Z ERROR [Info    ] [Debug_Probe-682078603] Copied from C:\XXXX\JLink\JLinkARM.dll.
    2021-08-17T14:03:57.837Z ERROR [Info    ] [Debug_Probe-682078603] Copy C:\XXXX\nrfconnect\resources\app.asar.unpacked\node_modules\pc-nrfjprog-js\build\Release\jlinkarm_unknown_nrfjprog.dll -> C:\XXXX\Local\Temp\sa4c.7nrfjprog\jlinkarm_unknown_nrfjprog.dll
    2021-08-17T14:03:57.837Z ERROR [Info    ] [Debug_Probe-682078603] File copy done
    2021-08-17T14:03:57.837Z ERROR [Info    ] [Debug_Probe-682078603] File copy successful
    2021-08-17T14:03:57.838Z ERROR [Info    ] [Debug_Probe-682078603] Load library at C:\XXXX\Temp\sa4c.7nrfjprog\jlinkarm_unknown_nrfjprog.dll.
    2021-08-17T14:03:57.838Z ERROR [Info    ] [Debug_Probe-682078603] Library loaded, loading member functions.
    2021-08-17T14:03:57.838Z ERROR [Info    ] [Debug_Probe-682078603] Member functions succesfully loaded.
    2021-08-17T14:03:57.838Z ERROR [Info    ] [Debug_Probe-682078603] Read the device's family.
    2021-08-17T14:03:57.838Z ERROR [Info    ] [Debug_Probe-682078603] Logger callback at 0x7bea5780 registered in Segger backend logger.
    2021-08-17T14:03:57.838Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] Logger callback at 0x7bea5780 registered in JLink logger.
    2021-08-17T14:03:57.838Z ERROR [Debug   ] [Debug_Probe-682078603] Just_open_dll_tagged_callback
    2021-08-17T14:03:57.838Z ERROR [Debug   ] [Debug_Probe-682078603] open_dll
    2021-08-17T14:03:57.839Z ERROR [Info    ] [Debug_Probe-682078603] Load library at C:\XXXX\Temp\sa4c.7nrfjprog\JLinkARM.dll.
    2021-08-17T14:03:57.839Z ERROR [Info    ] [Debug_Probe-682078603] Library loaded, loading member functions.
    2021-08-17T14:03:57.839Z ERROR [Info    ] [Debug_Probe-682078603] Member functions succesfully loaded.
    2021-08-17T14:03:57.839Z ERROR [Debug   ] [Debug_Probe-682078603] dll_version
    2021-08-17T14:03:57.839Z ERROR [Info    ] [Debug_Probe-682078603] Segger dll version 7.52.a loaded.
    2021-08-17T14:03:57.839Z ERROR [Debug   ] [Debug_Probe-682078603] set_core_data
    2021-08-17T14:03:57.839Z ERROR [Debug   ] [Debug_Probe-682078603] Just_connect_to_emu_with_snr
    2021-08-17T14:03:57.840Z ERROR [Debug   ] [Debug_Probe-682078603] connect_to_emu_with_snr
    2021-08-17T14:03:57.840Z ERROR [Debug   ] [Debug_Probe-682078603] is_connected_to_emu
    2021-08-17T14:03:57.840Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_enum_emu_snr
    2021-08-17T14:03:57.840Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_get_num_emus
    2021-08-17T14:03:57.840Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_connect_to_emu_with_snr
    2021-08-17T14:03:57.840Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_connect_to_emu_without_snr
    2021-08-17T14:03:57.840Z ERROR [Info    ] [Debug_Probe-682078603] Segger logging enabled.
    2021-08-17T14:03:57.840Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Feb  2 2021 16:47:20
    2021-08-17T14:03:57.841Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Feb  2 2021 16:47:20
    2021-08-17T14:03:57.841Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] Hardware: V1.00
    2021-08-17T14:03:57.841Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] S/N: 682078603
    2021-08-17T14:03:57.841Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] OEM: SEGGER
    2021-08-17T14:03:57.841Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    2021-08-17T14:03:57.841Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] TELNET listener socket opened on port 19021
    2021-08-17T14:03:57.841Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] WEBSRV Starting webserver
    2021-08-17T14:03:57.841Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] WEBSRV Webserver running on local port 19080
    2021-08-17T14:03:57.842Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 35.590ms returns "O.K."  
    2021-08-17T14:03:57.842Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.842Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_GetHWStatus(...)  
    2021-08-17T14:03:57.842Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.381ms returns 0  
    2021-08-17T14:03:57.842Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.842Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
    2021-08-17T14:03:57.842Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.006ms returns 0x01  
    2021-08-17T14:03:57.843Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.843Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
    2021-08-17T14:03:57.843Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.019ms returns 0x00  
    2021-08-17T14:03:57.843Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.843Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
    2021-08-17T14:03:57.843Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.016ms returns 0x00  
    2021-08-17T14:03:57.843Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.843Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog  
    2021-08-17T14:03:57.844Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
    2021-08-17T14:03:57.844Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.050ms returns 0  
    2021-08-17T14:03:57.844Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.844Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
    2021-08-17T14:03:57.844Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 1.208ms returns 0x00  
    2021-08-17T14:03:57.844Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.844Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_SetSpeed(2000)  
    2021-08-17T14:03:57.845Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.187ms  
    2021-08-17T14:03:57.845Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.845Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_GetSN()  
    2021-08-17T14:03:57.845Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.018ms returns 682078603  
    2021-08-17T14:03:57.845Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.846Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_load_core_data
    2021-08-17T14:03:57.846Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
    2021-08-17T14:03:57.846Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.023ms returns 0x00  
    2021-08-17T14:03:57.846Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.846Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_ExecCommand("device = Cortex-M4", ...).   
    2021-08-17T14:03:57.846Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] Device "CORTEX-M4" selected.
    2021-08-17T14:03:57.846Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] Device "CORTEX-M4" selected.
    2021-08-17T14:03:57.847Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 17.667ms returns 0x00  
    2021-08-17T14:03:57.847Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.847Z ERROR [Debug   ] [Debug_Probe-682078603] Just_read_device_family
    2021-08-17T14:03:57.847Z ERROR [Debug   ] [Debug_Probe-682078603] is_connected_to_emu
    2021-08-17T14:03:57.847Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_IsOpen()  
    2021-08-17T14:03:57.847Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.020ms returns 0x01  
    2021-08-17T14:03:57.847Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.848Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_Lock()  
    2021-08-17T14:03:57.848Z ERROR [Debug   ] [Debug_Probe-682078603] read_debug_port_idr
    2021-08-17T14:03:57.848Z ERROR [Debug   ] [Debug_Probe-682078603] read_debug_port_register
    2021-08-17T14:03:57.848Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_read_debug_port_register
    2021-08-17T14:03:57.848Z ERROR [Debug   ] [Debug_Probe-682078603] coresight_configure
    2021-08-17T14:03:57.848Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_CORESIGHT_Configure()  
    2021-08-17T14:03:57.848Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 101.266ms returns 0  
    2021-08-17T14:03:57.848Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.849Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_select_debug_port_register
    2021-08-17T14:03:57.849Z ERROR [Debug   ] [Debug_Probe-682078603] Select AP 255, DP Bank 0, AP Bank 255
    2021-08-17T14:03:57.849Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    2021-08-17T14:03:57.849Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 1.079ms returns -1  
    2021-08-17T14:03:57.849Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.849Z ERROR [Info    ] [Debug_Probe-682078603] JLinkARM.dll reported "-1", an unknown error.
    2021-08-17T14:03:57.849Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_abort_debug_action
    2021-08-17T14:03:57.849Z ERROR [Info    ] [Debug_Probe-682078603] Attempting to clear any configuration errors in debug port before closing connection. 
    2021-08-17T14:03:57.850Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    2021-08-17T14:03:57.850Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 1.049ms returns -1  
    2021-08-17T14:03:57.850Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.850Z ERROR [Info    ] [Debug_Probe-682078603] JLinkARM.dll reported "-1", an unknown error.
    2021-08-17T14:03:57.850Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.110ms  
    2021-08-17T14:03:57.850Z ERROR [Info    ] [Debug_Probe-682078603] Failed reading the device's family.
    2021-08-17T14:03:57.850Z ERROR [Debug   ] [Debug_Probe-682078603] Just_close_dll
    2021-08-17T14:03:57.850Z ERROR [Debug   ] [Debug_Probe-682078603] close
    2021-08-17T14:03:57.850Z ERROR [Debug   ] [Debug_Probe-682078603] disconnect_from_emu
    2021-08-17T14:03:57.851Z ERROR [Debug   ] [Debug_Probe-682078603] is_connected_to_emu
    2021-08-17T14:03:57.851Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_IsOpen()  
    2021-08-17T14:03:57.851Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.087ms returns 0x01  
    2021-08-17T14:03:57.851Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.851Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_disconnect_from_emu
    2021-08-17T14:03:57.851Z ERROR [Debug   ] [Debug_Probe-682078603] is_connected_to_device
    2021-08-17T14:03:57.851Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_IsConnected()  
    2021-08-17T14:03:57.852Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.073ms returns FALSE  
    2021-08-17T14:03:57.852Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.852Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_is_debug_region_powered
    2021-08-17T14:03:57.852Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_read_debug_port_register
    2021-08-17T14:03:57.854Z ERROR [Debug   ] [Debug_Probe-682078603] is_connected_to_emu
    2021-08-17T14:03:57.854Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_IsOpen()  
    2021-08-17T14:03:57.854Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.050ms returns 0x01  
    2021-08-17T14:03:57.854Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.854Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_Lock()  
    2021-08-17T14:03:57.854Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_select_debug_port_register
    2021-08-17T14:03:57.855Z ERROR [Debug   ] [Debug_Probe-682078603] Select AP 255, DP Bank 0, AP Bank 255
    2021-08-17T14:03:57.855Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    2021-08-17T14:03:57.855Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 1.290ms returns -1  
    2021-08-17T14:03:57.855Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.855Z ERROR [Info    ] [Debug_Probe-682078603] JLinkARM.dll reported "-1", an unknown error.
    2021-08-17T14:03:57.855Z ERROR [Debug   ] [Debug_Probe-682078603] ---just_abort_debug_action
    2021-08-17T14:03:57.855Z ERROR [Info    ] [Debug_Probe-682078603] Attempting to clear any configuration errors in debug port before closing connection. 
    2021-08-17T14:03:57.855Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    2021-08-17T14:03:57.856Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 1.123ms returns -1  
    2021-08-17T14:03:57.856Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_HasError()  
    2021-08-17T14:03:57.856Z ERROR [Info    ] [Debug_Probe-682078603] JLinkARM.dll reported "-1", an unknown error.
    2021-08-17T14:03:57.856Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] - 0.102ms  
    2021-08-17T14:03:57.856Z ERROR [Info    ] [Debug_Probe-682078603] [Info    ] [JLink     ] JLINK_Close()  
    2021-08-17T14:03:57.856Z ERROR [Debug   ] [Debug_Probe-682078603] Segger Backend closed.
    2021-08-17T14:03:57.856Z ERROR [Info    ] [Debug_Probe-682078603] Freeing library C:\XXXX\Temp\sa4c.7nrfjprog\jlinkarm_unknown_nrfjprog.dll.
    2021-08-17T14:03:57.869Z ERROR [Info    ] [Debug_Probe-682078603] Uninitializing probe with serial number 682078603.
    2021-08-17T14:03:57.870Z ERROR [Info    ] [Debug_Probe-682078603] Failed to initialize debug probe connection.
    2021-08-17T14:03:57.870Z ERROR [Info    ] [HighLevel ] ERROR: Failed while initializing probe.
    2021-08-17T14:03:57.870Z ERROR 
    

    Also I tried 

    nrfjprog -f nrf52 --eraseall or

    nrfjprog -f nrf52 --program XXXX.hex --chiperase

    Both of them involve reset creating the same issue.

    Only these commands work:

    nrfjprog -f nrf52 --program XXXX.hex --sectorerase

    nrfjprog.exe -f nrf52 --reset

    Do you think it safe to use the above commands to flash the firmware to the new chips while in mass production?

    Thanks

    /CJ

Related