[SOLVED] can't connect to FRDM k64 open sda

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

  • [SOLVED] can't connect to FRDM k64 open sda

    I'm trying to connect to the frdm board with the usb cable (via open sda).
    using KDS i cannot and getting this:

    SEGGER J-Link GDB Server V6.22d Command Line Version

    JLinkARM.dll V6.22d (DLL compiled Dec 14 2017 18:32:44)

    Command line: -if swd -device MK64FN1M0xxx12 -endian little -speed 30 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -s
    -----GDB Server start settings-----
    GDBInit file: none
    GDB Server Listening port: 2331
    SWO raw output listening port: 2332
    Terminal I/O port: 2333
    Accept remote connection: localhost only
    Generate logfile: off
    Verify download: on
    Init regs on start: on
    Silent mode: off
    Single run mode: on
    Target connection timeout: 0 ms
    ------J-Link related settings------
    J-Link Host interface: USB
    J-Link script: none
    J-Link settings file: none
    ------Target related settings------
    Target device: MK64FN1M0xxx12
    Target interface: SWD
    Target interface speed: 30kHz
    Target endian: little

    Connecting to J-Link...
    J-Link is connected.
    Firmware: J-Link OpenSDA 2 compiled Nov 16 2017 12:36:48
    Hardware: V1.00
    S/N: 621000000
    Checking target voltage...
    Target voltage: 3.30 V
    Listening on TCP/IP port 2331
    Connecting to target...ERROR: InitTarget(): PCode returned with error code -1

    ERROR: Could not connect to target.
    Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
    Shutting down...
    Could not connect to target.
    Please check power, connection and settings.


    Using Jlink commander I've tried 'connect' and getting the attached picture.
    So, I'm currently stuck...
    Please help.
    Images
    • 1.png

      22.92 kB, 630×586, viewed 1,099 times
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.

    From the Commander Screenshot you provided you tried to connect via JTAG which is not supported with this J-Link OB.
    Try using SWD instead.
    Does the connect work then in commander?

    For the error with GDB could you enable the J-Link log file and attach it to the thread?
    How is described here: wiki.segger.com/Enable_J-Link_log_file

    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.
  • Thanks Nino for the prompt reply.
    Both SWD and JTAG does not work. I've attached a few logs, for your convenient.
    THanks for the help. I'm currently stuck.

    I want to emphasize I do not work with SEGGER product box (plus, or any other for that matter) but connecting the usb cable directly to J26 connector on the FRDM board.
    Roy
    Images
    • set_SWD.png

      29.17 kB, 677×799, viewed 554 times
    Files
  • Hello,

    Thank you for providing the logs.
    It seems like you have enabled security on your board and thus locked out the debug probe.
    Did this happen with J-Link? Because J-Link usually warns you if your are about to "brick" your board.

    Nonetheless hope is still not lost. To recover the board you need the reset pin of the MCU to be connected to the J-Link.
    This is however not the case with the J-Link OB (J26 connection).

    For this you need to use an external J-Link and the following adapter: segger.com/products/debug-prob…s/9-pin-cortex-m-adapter/

    Connect that adapter to J9 and try to connect over SWD.
    If that did not work try unlock kinetis again. This should work now if the chip is not physically broken e.g. through a over voltage or similar.

    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.
  • Ok, Nino.
    Thank you very much.
    I was working a lot with this specific board together with the Segger Plus and this adapter connected to J9 connector of the FRDM board. Maybe I somehow did not pay attention to the poped up message. I will try it again.
    My question is regarding working with this specific board and the micro usb over Open Sda - Now that I understand the security is enabled. is this feasible?
    Roy
  • Hi Roy,

    If you disable the security with your J-Link Plus then you can use the OB over micro USB again.
    Should you not see the pop up check if you have disabled it permanently: wiki.segger.com/Secured_Kinetis_device_detected

    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.
  • Hi,

    I had exactly this issue.

    It seems you cannot have both the USB OpenSDA SWD and the direct J9 SWD. The default is USB debugging.

    In the manual of the FRDM-K64F it talks about this and the solution is to cut J8 and J12.

    From page 17 of os.mbed.com/media/uploads/GregC/frdm-k64f_ug_rev0.1.pdf


    14 Debug
    The debug interface on MK64FN1M0VLL12 MCU is a Serial Wire Debug (SWD) port with trace
    output capability. There are two debug interfaces on the FRDM-K64F: onboard OpenSDAv2 circuit
    (J26) and K64 direct SWD connection (J9).

    Note
    To use an external debugger, such as J-Link, you may need to disconnect
    the OpenSDA SWD from the K64. To do this on the FRDM-K64F board,
    cut the shorting trace which connects the pins of jumper holes on
    connectors J8 and J12.


    cheers,

    Andy