Tuesday, May 22nd 2018, 12:39am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

roymesi

Beginner

Date of registration: Dec 19th 2017

Posts: 7

1

Wednesday, December 20th 2017, 10:40pm

[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.
roymesi has attached the following image:
  • 1.png

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 1,048

2

Thursday, December 21st 2017, 3:33pm

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: https://wiki.segger.com/Enable_J-Link_log_file

Best regards,
Nino
Please read the forum rules before posting: Forum Rules

Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
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 contact us per e-mail.
The following contact form can be used for this: https://www.segger.com/about-us/contact-us/


roymesi

Beginner

Date of registration: Dec 19th 2017

Posts: 7

3

Thursday, December 21st 2017, 8:21pm

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
roymesi has attached the following image:
  • set_SWD.png
roymesi has attached the following files:

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 1,048

4

Friday, December 22nd 2017, 9:32am

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: https://www.segger.com/products/debug-pr…rtex-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: Forum Rules

Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
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 contact us per e-mail.
The following contact form can be used for this: https://www.segger.com/about-us/contact-us/


roymesi

Beginner

Date of registration: Dec 19th 2017

Posts: 7

5

Saturday, December 23rd 2017, 4:42pm

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

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 1,048

6

Thursday, January 4th 2018, 2:11pm

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: https://wiki.segger.com/Secured_Kinetis_device_detected

Best regards,
Nino
Please read the forum rules before posting: Forum Rules

Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
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 contact us per e-mail.
The following contact form can be used for this: https://www.segger.com/about-us/contact-us/


Lazybrush

Beginner

Date of registration: Jan 11th 2018

Posts: 1

7

Thursday, January 11th 2018, 11:54am

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 https://os.mbed.com/media/uploads/GregC/…f_ug_rev0.1.pdf

Quoted


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