Saturday, April 21st 2018, 7:26pm 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.

Yurikm

Beginner

Date of registration: Aug 1st 2014

Posts: 2

Location: Ottawa, Ontario

1

Tuesday, August 5th 2014, 2:14pm

Kinetis K20: Bad JTAG Commnication, but works well with K10

I have tried FLASHER ARM v1 and JLink/JFlash v7 both performing identically (using SW V4.90).

1. Both units work perfectly with our Kinetis K10 target microcontroller

2. Both units do not work with Kinetis K20 target boards.
Interestingly, if I hold the MCU in reset, I can properly detect and identify the target.
But as soon as I release reset, the target cannot longer be detected.
----
Bad JTAG communication: Write to IR: Expected 0x1, got 0x0
(TAP COmmand : 11) @ Off 0x5
Kinetis (connect): Error while halting CPU.
Failed to connect
----

3. I was able to connect to the target (erase/program) in IAR Workbench using PE Micro Multilink.
Using Segger hardware in IAR Workbench IDE gave identical problem as described in 2 above.

Please help me to resolve the issues with Segger JFLASHER ARM and JLINK and Kinetis K20 devices.

Yuri

SEGGER - Erik

Super Moderator

Date of registration: Dec 20th 2011

Posts: 400

2

Wednesday, August 6th 2014, 1:53pm

Hi,

We gave it a try here on an Freescale XTWR-K20D72M Evalboard (PK20DX256VLL7 on it) connected to a J-Link V7.0
and connecting/erasing/programming in J-Flash works perfectly fine. Do you use custom hardware or an evalboard? If evalboard, which one?

Can you please start J-Link Commander with following command-line parameters: -device MK20DX256xxx7 -if SWD -speed 4000).
Now type in "r" and "regs" without quotes in order to test functionality. Can you please create a screenshot of the complete
Commander output (first line to last line) and upload it?


Best regards
Erik

Yurikm

Beginner

Date of registration: Aug 1st 2014

Posts: 2

Location: Ottawa, Ontario

3

Wednesday, November 19th 2014, 8:46pm

I am sorry Erik for such a long delay (moved to a different project and now back to MK20 Flasher issue)

I do have custom target board that I was able to program using PEMicro Multilink inside IAR ARM environment.
But I cannot program it using Flasher ARM with error report matching my original post.

Instead of screenshot you requested here is the text from Jlink Commander (I modified the line to match my target):


""""""""""""""""""""""""""""""""



C:\Program Files (x86)\SEGGER\JLink_V490>jlink -device MK20DN512xxx10 -if SWD -speed 4000
SEGGER J-Link Commander V4.90 ('?' for help)
Compiled Jul 28 2014 10:35:28
Info: Device "MK20DN512XXX10" selected (512 KB flash, 128 KB RAM).
DLL version V4.90, compiled Jul 28 2014 10:35:20
Firmware: J-Link ARM / Flasher ARM V2 compiled Aug 19 2013 20:53:43
Hardware: V1.00
S/N: 162100722
Feature(s): JFlash
Emulator has Trace capability
VTarget = 3.021V
Info: Found SWD-DP with ID 0x2BA01477
Info: Found SWD-DP with ID 0x2BA01477

****** Error: Kinetis (connect): Error while halting CPU.
Info: Found SWD-DP with ID 0x2BA01477
Info: Found SWD-DP with ID 0x2BA01477

****** Error: Kinetis (connect): Error while halting CPU.
Can not connect to target.
Failed to identify target. Trying again with slow (4 kHz) speed.
Info: Found SWD-DP with ID 0x2BA01477
Info: Found SWD-DP with ID 0x2BA01477

****** Error: Kinetis (connect): Error while halting CPU.
Info: Found SWD-DP with ID 0x2BA01477
Info: Found SWD-DP with ID 0x2BA01477

****** Error: Kinetis (connect): Error while halting CPU.
Can not connect to target.
No device found at all. Selecting JTAG as default target interface.

J-Link>r
Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
Info: TotalIRLen = 4, IRPrint = 0x01

****** Error: Bad JTAG communication: Write to IR: Expected 0x1, got 0x0 (TAP Command : 11) @ Off 0x5.
Kinetis (connect): Error while halting CPU.
Reset delay: 0 ms
Reset type UNKNOWN: ???

J-Link>regs
CPU is not halted !
J-Link>


""""""""""""""""""""""""""""""""

I really hope you can help me resolve this.
Thank you very much,
Yuri
Yurikm has attached the following image:
  • Clipboard01.jpg

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

4

Thursday, November 20th 2014, 10:45am

Hi,

Is the reset pin of the MCU connected to J-Link / Flasher?
This is mandatory for Kinetis devices. Otherwise, operation might be unstable and a connection cannot always be established.

Moreover, please understand that we cannot provide further support here, as both units you are using, are already out of support for some time.


Best regards
Alex