Detecting JLINK with nrfjprog

Hi all,

I'm trying something similar to this:

https://devzone.nordicsemi.com/f/nordic-q-a/21628/how-to-use-nrfjprog-dll

i.e. using the nrfprog.dll to connect with a Jlink from a c# application.

Opening the .dll works fine and I now want to use this function:

nrfjprogdll_err_t NRFJPROG_enum_emu_snr(uint32_t serial_numbers[], uint32_t serial_numbers_len, uint32_t * num_available);

wrapped in my App as:

[DllImport("nrfjprog.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern int NRFJPROG_enum_emu_snr(UInt32[] serial_numbers,UInt32 serial_numbers_len, out UInt32 num_available);

The num_available returned is correct, i.e. 1 if one JLINK is connected, 2 if two are connected etc. The serial_numbers and serial_numbers_len are, however, empty.

Looking at the arguments one would think that this is because serial_numbers and serial_numbers_len are not "pointers" and can therefore not "return" any values. 

Consequently I try to modify the wrapper to:

private static extern int NRFJPROG_enum_emu_snr(out UInt32[] serial_numbers,out UInt32 serial_numbers_len, out UInt32 num_available);

Unfortunately this result in the following runtime error:

>>Exception thrown: 'System.AccessViolationException' in NRFJPROG.exe
>>An unhandled exception of type 'System.AccessViolationException' occurred in NRFJPROG.exe
>>Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Any ideas on how to make this work ?

Cheers

Eric

Parents
  • Hi,

    What is the initial value of the serial_numbers_len?

    Best regards,
    Dejan

  • Hi,

    I initiated serial_numbers_len to 0 as suggested in the header file.

    However, I just discovered that when NRFJPROG_connect_to_emu_without_snr is called, and several JLINKs are attached, a selection pop-up is automatically created. Thus, no need to implement this myself.

    \Eric

  • Yes, but I'm doing that. Here is the complete code:

    static string JLinkPath = "C:\\Program Files\\SEGGER\\JLink\\JLink_x64.dll";

    [DllImport("nrfjprog.dll", CallingConvention = CallingConvention.Cdecl)]
    private static extern int NRFJPROG_open_dll(string jlink_path, System.IntPtr cb, int family);

    [DllImport("nrfjprog.dll", CallingConvention = CallingConvention.Cdecl)]
    private static extern void NRFJPROG_close_dll();

    [DllImport("nrfjprog.dll", CallingConvention = CallingConvention.Cdecl)]
    private static extern int NRFJPROG_connect_to_emu_without_snr(int clock_speed_in_khz);

    [DllImport("nrfjprog.dll", CallingConvention = CallingConvention.Cdecl)]
    private static extern int NRFJPROG_read_connected_emu_snr(out int serial_number);

    private void btnJlink_Click(object sender, RoutedEventArgs e)
    {

    int snr,clock_speed_in_khz = 4000;
    IntPtr cb = new IntPtr();

    NRFJPROG_close_dll();

    NRFJPROG_open_dll(JLinkPath, cb, 1);

    NRFJPROG_connect_to_emu_without_snr(clock_speed_in_khz);

    NRFJPROG_read_connected_emu_snr(out snr);

    }

    And as previously stated, snr will have the correct serial number IF the emulator is (physically) connected to a target but "0" if it is not.

    \Eric

  • Hi,

    Could you please provide the return value of the NRFJPROG_read_connected_emu_snr() in the failing case?

    Best regards,
    Dejan

  • Like I said it is "0", i.e. a valid null terminated string with one character.

    \Eric

  • Hi,

    Could you provide  a log either by providing a callback to the cb parameter or by setting jlink to log the output to a file (J-Link log file)?

    Best regards,
    Dejan

  • Ok, so one  "success log" and one "fail log" attached. It seems the correct SNR is read also in the fail log but that something goes wrong due to the (obviously) "low target voltage".

    \Eric

    Start
    [SeggerBackend] [Debug] Logger sink registered in Segger backend logger
    [JLink] [Debug] Logger sink registered in JLink logger
    [nRF52] [Debug] open
    [nRF52] [Debug] just_check_family
    [SeggerBackend] [Debug] open_dll
    [SeggerBackend] [Info] Load library at C:\Program Files\SEGGER\JLink\JLink_x64.dll.
    [SeggerBackend] [Info] Library loaded, loading member functions.
    [SeggerBackend] [Info] Member functions succesfully loaded.
    [SeggerBackend] [Debug] dll_version
    [SeggerBackend] [Info] Segger dll version 7.60.c loaded.
    [nRF52] [Debug] connect_to_emu_without_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] connect_to_emu_without_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] ---just_get_num_emus
    [SeggerBackend] [Debug] ---just_connect_to_emu_without_snr
    [SeggerBackend] [Debug] Segger logging enabled.
    [JLink] [None] Firmware: J-Link V9 compiled May  7 2021 16:26:12
    [JLink] [None] Firmware: J-Link V9 compiled May  7 2021 16:26:12
    [JLink] [None] Decompressing FW timestamp took 193 us
    [JLink] [None] Hardware: V9.10
    [JLink] [None] S/N: 609100402
    [JLink] [None] OEM: SEGGER
    [JLink] [None] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    [JLink] [None] TELNET listener socket opened on port 19021
    [JLink] [None] WEBSRV WEBSRV_Init(): Starting webserver thread(s)
    [JLink] [None] WEBSRV Webserver running on local port 19080
    [JLink] [None] - 28.548ms returns "O.K."  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_Lock()  
    [JLink] [None] JLINK_GetHWStatus(...)  
    [JLink] [None] - 0.631ms returns 0  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
    [JLink] [None] - 0.006ms returns 0x01  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_ExecCommand("DisableFlashDL", ...).   
    [JLink] [None] - 0.018ms returns 0x00  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
    [JLink] [None] - 0.013ms returns 0x00  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_SetHookUnsecureDialog  
    [JLink] [None] JLINK_SetHookUnsecureDialog(...)
    [JLink] [None] - 0.429ms returns 0  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
    [JLink] [None] - 2.100ms returns 0x00  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_SetSpeed(4000)  
    [JLink] [None] - 0.552ms  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_GetSN()  
    [JLink] [None] - 0.208ms returns 609100402  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Debug] read_debug_port_idr
    [SeggerBackend] [Debug] read_debug_port_register
    [SeggerBackend] [Debug] ---just_read_debug_port_register
    [SeggerBackend] [Debug] coresight_configure
    [JLink] [None] JLINK_CORESIGHT_Configure()  
    [JLink] [None] - 101.321ms returns 0  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Debug] ---just_select_debug_port_register
    [SeggerBackend] [Debug] Select AP 255, DP Bank 0, AP Bank 255
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.684ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.681ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.411ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.600ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.333ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.309ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.005ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.980ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.159ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.917ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.012ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.040ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.022ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.950ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.946ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.167ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.915ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.909ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.924ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.037ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.953ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.021ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.840ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.839ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.943ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.760ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.855ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.831ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.998ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.948ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] - 0.469ms  
    [nRF52] [Debug] read_connected_emu_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [JLink] [None] JLINK_IsOpen()  
    [JLink] [None] - 0.272ms returns 0x01  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_Lock()  
    [SeggerBackend] [Debug] read_connected_emu_snr
    [JLink] [None] - 0.304ms  
    [nRF52] [Debug] close
    [SeggerBackend] [Debug] is_connected_to_emu
    [JLink] [None] JLINK_IsOpen()  
    [JLink] [None] - 0.438ms returns 0x01  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_Lock()  
    [SeggerBackend] [Debug] close
    [SeggerBackend] [Debug] disconnect_from_emu
    [SeggerBackend] [Debug] ---just_disconnect_from_emu
    [SeggerBackend] [Debug] is_connected_to_device
    [JLink] [None] JLINK_IsConnected()  
    [JLink] [None] - 2.951ms returns FALSE  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Debug] ---just_is_debug_region_powered
    [SeggerBackend] [Debug] ---just_read_debug_port_register
    [SeggerBackend] [Debug] ---just_select_debug_port_register
    [SeggerBackend] [Debug] Select AP 255, DP Bank 0, AP Bank 255
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.035ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.862ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.920ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.053ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.950ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.032ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.033ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.857ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.824ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.885ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.801ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.946ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.983ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.027ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.946ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.921ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.951ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.818ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.829ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.886ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.985ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.792ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.834ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.138ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.826ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.955ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.853ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.004ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.938ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.815ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] - 0.468ms  
    [JLink] [None] JLINK_Close()  
    [SeggerBackend] [Debug] Segger Backend closed.
    [nRF52] [Debug] nRF family DLL closed
    
    Start
    [SeggerBackend] [Debug] Logger sink registered in Segger backend logger
    [JLink] [Debug] Logger sink registered in JLink logger
    [nRF52] [Debug] open
    [nRF52] [Debug] just_check_family
    [SeggerBackend] [Debug] open_dll
    [SeggerBackend] [Info] Load library at C:\Program Files\SEGGER\JLink\JLink_x64.dll.
    [SeggerBackend] [Info] Library loaded, loading member functions.
    [SeggerBackend] [Info] Member functions succesfully loaded.
    [SeggerBackend] [Debug] dll_version
    [SeggerBackend] [Info] Segger dll version 7.60.c loaded.
    [nRF52] [Debug] connect_to_emu_without_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] connect_to_emu_without_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] ---just_get_num_emus
    [SeggerBackend] [Debug] ---just_connect_to_emu_without_snr
    [SeggerBackend] [Debug] Segger logging enabled.
    [JLink] [None] Firmware: J-Link V9 compiled May  7 2021 16:26:12
    [JLink] [None] Firmware: J-Link V9 compiled May  7 2021 16:26:12
    [JLink] [None] Decompressing FW timestamp took 183 us
    [JLink] [None] Hardware: V9.10
    [JLink] [None] S/N: 609100402
    [JLink] [None] OEM: SEGGER
    [JLink] [None] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    [JLink] [None] TELNET listener socket opened on port 19021
    [JLink] [None] WEBSRV WEBSRV_Init(): Starting webserver thread(s)
    [JLink] [None] WEBSRV Webserver running on local port 19080
    [JLink] [None] - 28.863ms returns "O.K."  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_Lock()  
    [JLink] [None] JLINK_GetHWStatus(...)  
    [JLink] [None] - 0.807ms returns 0  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] Low voltage detected in target device.
    [JLink] [None] - 0.498ms  
    [JLink] [None] JLINK_Close()  
    [SeggerBackend] [Debug] is_connected_to_emu
    [nRF52] [Debug] read_connected_emu_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] read_connected_emu_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Error] Cannot call read_connected_emu_snr when connect_to_emu_without_snr or connect_to_emu_with_snr has not been called.
    [SeggerBackend] [Debug] is_connected_to_emu
    [nRF52] [Debug] close
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] close
    [SeggerBackend] [Debug] disconnect_from_emu
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] Segger Backend closed.
    [nRF52] [Debug] nRF family DLL closed
    

Reply
  • Ok, so one  "success log" and one "fail log" attached. It seems the correct SNR is read also in the fail log but that something goes wrong due to the (obviously) "low target voltage".

    \Eric

    Start
    [SeggerBackend] [Debug] Logger sink registered in Segger backend logger
    [JLink] [Debug] Logger sink registered in JLink logger
    [nRF52] [Debug] open
    [nRF52] [Debug] just_check_family
    [SeggerBackend] [Debug] open_dll
    [SeggerBackend] [Info] Load library at C:\Program Files\SEGGER\JLink\JLink_x64.dll.
    [SeggerBackend] [Info] Library loaded, loading member functions.
    [SeggerBackend] [Info] Member functions succesfully loaded.
    [SeggerBackend] [Debug] dll_version
    [SeggerBackend] [Info] Segger dll version 7.60.c loaded.
    [nRF52] [Debug] connect_to_emu_without_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] connect_to_emu_without_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] ---just_get_num_emus
    [SeggerBackend] [Debug] ---just_connect_to_emu_without_snr
    [SeggerBackend] [Debug] Segger logging enabled.
    [JLink] [None] Firmware: J-Link V9 compiled May  7 2021 16:26:12
    [JLink] [None] Firmware: J-Link V9 compiled May  7 2021 16:26:12
    [JLink] [None] Decompressing FW timestamp took 193 us
    [JLink] [None] Hardware: V9.10
    [JLink] [None] S/N: 609100402
    [JLink] [None] OEM: SEGGER
    [JLink] [None] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    [JLink] [None] TELNET listener socket opened on port 19021
    [JLink] [None] WEBSRV WEBSRV_Init(): Starting webserver thread(s)
    [JLink] [None] WEBSRV Webserver running on local port 19080
    [JLink] [None] - 28.548ms returns "O.K."  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_Lock()  
    [JLink] [None] JLINK_GetHWStatus(...)  
    [JLink] [None] - 0.631ms returns 0  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
    [JLink] [None] - 0.006ms returns 0x01  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_ExecCommand("DisableFlashDL", ...).   
    [JLink] [None] - 0.018ms returns 0x00  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
    [JLink] [None] - 0.013ms returns 0x00  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_SetHookUnsecureDialog  
    [JLink] [None] JLINK_SetHookUnsecureDialog(...)
    [JLink] [None] - 0.429ms returns 0  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
    [JLink] [None] - 2.100ms returns 0x00  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_SetSpeed(4000)  
    [JLink] [None] - 0.552ms  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_GetSN()  
    [JLink] [None] - 0.208ms returns 609100402  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Debug] read_debug_port_idr
    [SeggerBackend] [Debug] read_debug_port_register
    [SeggerBackend] [Debug] ---just_read_debug_port_register
    [SeggerBackend] [Debug] coresight_configure
    [JLink] [None] JLINK_CORESIGHT_Configure()  
    [JLink] [None] - 101.321ms returns 0  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Debug] ---just_select_debug_port_register
    [SeggerBackend] [Debug] Select AP 255, DP Bank 0, AP Bank 255
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.684ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.681ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.411ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.600ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.333ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.309ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.005ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.980ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.159ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.917ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.012ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.040ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.022ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.950ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.946ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.167ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.915ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.909ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.924ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.037ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.953ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.021ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.840ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.839ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.943ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.760ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.855ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.831ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.998ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.948ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] - 0.469ms  
    [nRF52] [Debug] read_connected_emu_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [JLink] [None] JLINK_IsOpen()  
    [JLink] [None] - 0.272ms returns 0x01  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_Lock()  
    [SeggerBackend] [Debug] read_connected_emu_snr
    [JLink] [None] - 0.304ms  
    [nRF52] [Debug] close
    [SeggerBackend] [Debug] is_connected_to_emu
    [JLink] [None] JLINK_IsOpen()  
    [JLink] [None] - 0.438ms returns 0x01  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_Lock()  
    [SeggerBackend] [Debug] close
    [SeggerBackend] [Debug] disconnect_from_emu
    [SeggerBackend] [Debug] ---just_disconnect_from_emu
    [SeggerBackend] [Debug] is_connected_to_device
    [JLink] [None] JLINK_IsConnected()  
    [JLink] [None] - 2.951ms returns FALSE  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Debug] ---just_is_debug_region_powered
    [SeggerBackend] [Debug] ---just_read_debug_port_register
    [SeggerBackend] [Debug] ---just_select_debug_port_register
    [SeggerBackend] [Debug] Select AP 255, DP Bank 0, AP Bank 255
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.035ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.862ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.920ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.053ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.950ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.032ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 1.033ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.857ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.824ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.885ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.801ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.946ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.983ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.027ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.946ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.921ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.951ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.818ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.829ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.886ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.985ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.792ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.834ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.138ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [JLink] [None] - 0.826ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [SeggerBackend] [Debug] ---just_abort_debug_action
    [SeggerBackend] [Debug] Attempting to clear any configuration errors in debug port before closing connection. 
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.955ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.853ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 1.004ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.938ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
    [JLink] [None] - 0.815ms returns -1  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] JLinkARM.dll reported "-1", "An unknown error.".
    [JLink] [None] - 0.468ms  
    [JLink] [None] JLINK_Close()  
    [SeggerBackend] [Debug] Segger Backend closed.
    [nRF52] [Debug] nRF family DLL closed
    
    Start
    [SeggerBackend] [Debug] Logger sink registered in Segger backend logger
    [JLink] [Debug] Logger sink registered in JLink logger
    [nRF52] [Debug] open
    [nRF52] [Debug] just_check_family
    [SeggerBackend] [Debug] open_dll
    [SeggerBackend] [Info] Load library at C:\Program Files\SEGGER\JLink\JLink_x64.dll.
    [SeggerBackend] [Info] Library loaded, loading member functions.
    [SeggerBackend] [Info] Member functions succesfully loaded.
    [SeggerBackend] [Debug] dll_version
    [SeggerBackend] [Info] Segger dll version 7.60.c loaded.
    [nRF52] [Debug] connect_to_emu_without_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] connect_to_emu_without_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] ---just_get_num_emus
    [SeggerBackend] [Debug] ---just_connect_to_emu_without_snr
    [SeggerBackend] [Debug] Segger logging enabled.
    [JLink] [None] Firmware: J-Link V9 compiled May  7 2021 16:26:12
    [JLink] [None] Firmware: J-Link V9 compiled May  7 2021 16:26:12
    [JLink] [None] Decompressing FW timestamp took 183 us
    [JLink] [None] Hardware: V9.10
    [JLink] [None] S/N: 609100402
    [JLink] [None] OEM: SEGGER
    [JLink] [None] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    [JLink] [None] TELNET listener socket opened on port 19021
    [JLink] [None] WEBSRV WEBSRV_Init(): Starting webserver thread(s)
    [JLink] [None] WEBSRV Webserver running on local port 19080
    [JLink] [None] - 28.863ms returns "O.K."  
    [JLink] [None] JLINK_HasError()  
    [JLink] [None] JLINK_Lock()  
    [JLink] [None] JLINK_GetHWStatus(...)  
    [JLink] [None] - 0.807ms returns 0  
    [JLink] [None] JLINK_HasError()  
    [SeggerBackend] [Error] Low voltage detected in target device.
    [JLink] [None] - 0.498ms  
    [JLink] [None] JLINK_Close()  
    [SeggerBackend] [Debug] is_connected_to_emu
    [nRF52] [Debug] read_connected_emu_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] read_connected_emu_snr
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Error] Cannot call read_connected_emu_snr when connect_to_emu_without_snr or connect_to_emu_with_snr has not been called.
    [SeggerBackend] [Debug] is_connected_to_emu
    [nRF52] [Debug] close
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] close
    [SeggerBackend] [Debug] disconnect_from_emu
    [SeggerBackend] [Debug] is_connected_to_emu
    [SeggerBackend] [Debug] Segger Backend closed.
    [nRF52] [Debug] nRF family DLL closed
    

Children
Related