[SOLVED] Target, Connect J-Link - Error: Check connection and target interface type

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Target, Connect J-Link - Error: Check connection and target interface type

    Hi, I'm Matthew. I used Keil MDK-ARM 5 recently and I was trying to change to SEGGER Embedded Studio so I can create a firmware with my MacBook.

    Before testing it with the MacBook, I'm using
    - 64-bit Windows 10 desktop
    - 64-bit SEGGER Embedded Studio V3.24 (SES, Non-Commercial License)
    - J-Link Edu and J-Link Plus
    - Nordic's nRF-52 PCA10040
    - STM32L4 Discovery board



    I receive an error message; "Failed to connect to target. No idcode detected. Please check connection and Target Interface Type"
    This appears when I click Target - Connect J-Link with SES.

    To begin with, while installing SES, I noticed something peculiar.
    I have checked the "Install J-Link driver 6.16g" but J-Link tools (J-Flash, J-Link RTT Logger, and more) were not installed on my Windows desktop.



    I thought that was the reason for the error message. So I have installed J-Link 6.16h manually.
    After this manual installation, J-Link tools were installed normally and other tools were able to detect my J-Link.



    However, SES still throws the error message.
    What should I do to solve this to debug PCA10040 and STM32L4 Discovery board?

    -Best Regards
    -Best Regards, Matthew

    The post was edited 1 time, last by MatthewKyeo ().

  • Hello Matthew,

    Thank you for your inquiry.
    Sorry for the delay in response.
    To begin with, while installing SES, I noticed something peculiar.
    I have checked the "Install J-Link driver 6.16g" but J-Link tools (J-Flash, J-Link RTT Logger, and more) were not installed on my Windows desktop.

    This is expected behaviour as Embedded studio gets shipped with only the JLink.DLL and USB drivers so you can start debugging out of the box without ever needing to install the complete J-Link software package.
    If you want to have all other J-Link software package applications as well you have to install them manually.

    I receive an error message; "Failed to connect to target. No idcode detected. Please check connection and Target Interface Type"
    This appears when I click Target - Connect J-Link with SES.


    This issue is most likely related to either a bad debug interface connection or bad power supply to the target device.
    What does the J-Link Commander output if you try to connect with it?
    You can follow the following guide: wiki.segger.com/J-Link_cannot_connect_to_the_CPU
    Could you post a screenshot of your full J-Link Commander output?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • SEGGER - Nino wrote:

    You can follow the following guide: wiki.segger.com/J-Link_cannot_connect_to_the_CPU
    Could you post a screenshot of your full J-Link Commander output?
    Hello, sorry for the delay. I haven't received any notification after your reply.

    I have observed the "USB connection O.K" message from the J-Link Commander.





    For details, I have taken a video.

    Other programs, such as Nordic's nRFgo studio is reading my J-Link Plus with no problem. SES is the only program that cannot connect.

    The commander is reading the input. Whereas, the SES cannot connect the J-Link Plus.


    What seems to be the problem?
    -Best Regards, Matthew
  • Uploaded JLink Log

    Hi, Nino. This is the log result.

    Source Code

    1. T277C 000:000 SEGGER J-Link V6.18 Log File (0000ms, 0000ms total)
    2. T277C 000:000 DLL Compiled: Aug 3 2017 16:21:33 (0000ms, 0000ms total)
    3. T277C 000:000 Logging started @ 2017-08-21 09:40 (0000ms, 0000ms total)
    4. T277C 000:000 JLINK_EMU_SelectByUSBSN(SerialNo = 0) returns 0xFFFFFFFF (0000ms, 0000ms total)
    5. T277C 000:000 JLINK_ExecCommand("EnableAutoUpdateFW", ...). returns 0x00 (0000ms, 0000ms total)
    6. T277C 000:000 JLINK_OpenEx(...)
    7. Firmware: J-Link V10 compiled Jul 28 2017 08:59:01
    8. Hardware: V10.10
    9. S/N: 6XXXXXXXX
    10. Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    11. TELNET listener socket opened on port 19021WEBSRV
    12. Webserver running on local port 19080 returns O.K. (0011ms, 0011ms total)
    13. T277C 000:011 JLINK_GetEmuCaps() returns 0xB9FF7BBF (0000ms, 0011ms total)
    14. T277C 000:011 JLINK_GetFirmwareString(...) (0000ms, 0011ms total)
    15. T277C 000:011 JLINK_GetDLLVersion() returns 61800 (0000ms, 0011ms total)
    16. T277C 000:011 JLINK_GetHardwareVersion() returns 0x18A88 (0000ms, 0011ms total)
    17. T277C 000:011 JLINK_GetHWStatus(...) returns 0x00 (0001ms, 0012ms total)
    18. T277C 000:012 JLINK_ExecCommand("ProjectFile = "C:/Users/USERNAME/Documents/SEGGER Embedded Studio Projects/Hello/Hello_Debug.jlink"", ...). returns 0x00 (0153ms, 0165ms total)
    19. T277C 000:165 JLINK_DEVICE_GetIndex(sDeviceName = Cortex-M3) returns 13 (0000ms, 0165ms total)
    20. T277C 000:165 JLINK_ExecCommand("device = Cortex-M3", ...). Device "CORTEX-M3" selected. returns 0x00 (0002ms, 0167ms total)
    21. T277C 000:167 JLINK_DEVICE_GetIndex(sDeviceName = Cortex-M3) returns 13 (0000ms, 0167ms total)
    22. T277C 000:167 JLINK_DEVICE_G
    Display All





    This part; JLINK_EMU_SelectByUSBSN(SerialNo = 0) returns 0xFFFFFFFF (0000ms, 0001ms total)


    I think this has a relationship with the "no idcode" error.


    Can you help me with this?

    -Best Regards
    -Best Regards, Matthew

    The post was edited 3 times, last by MatthewKyeo ().

  • Hi Matthew,

    Sorry for the delay in response, it is currently vacation time and many new projects have come in making it quite a busy summer.

    Thank you for providing me with additional setup information, especially the J-Link Commander output is crucial here.
    It reads "VTref = 0.000 V" which indicates that the target is not powered and/or the debug probe gets no information about the target power and thus does not know with what voltage the
    debug pins should be driven. This is a safety measure to make sure our debug probes do not ever damage the target hardware.
    To be able to connect to the target make sure that on PIN 1 (VTref) of the debug interface is connected to the target devices supply voltage.

    More information about a proper interface connection can be found here: segger.com/products/debug-prob…gy/interface-description/

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • SEGGER - Nino wrote:

    Sorry for the delay in response, it is currently vacation time and many new projects have come in making it quite a busy summer.

    Thank you for providing me with additional setup information, especially the J-Link Commander output is crucial here.
    It reads "VTref = 0.000 V" which indicates that the target is not powered and/or the debug probe gets no information about the target power and thus does not know with what voltage the
    debug pins should be driven.
    Hi, Nino. I apologize for pushing.

    Thanks for solving this. As you have mentioned, after powering my board, the SES shows "CortexMx on J-link" at the bottom of the screen.



    Good luck on your summer projects!

    -Best Regards, Matthew
    -Best Regards, Matthew
  • Hi Matthew,

    You are welcome.
    I will consider this thread as closed then.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.