AnsweredAssumed Answered

TWR-KL25Z48M SWD port

Question asked by Yuji Sasaki on Sep 11, 2013
Latest reply on Apr 11, 2016 by manu mr

Does anybody know, or have ever tried, to connect J-Link (or any JTAG/SWD debugger pod) to Freescale TWR-KL25Z48M SWD connector (J10)?

 

In my environment (Windows XP Home, IAR embedded workbench 6.60 32K-limited eval version), OpenSDA USB-filesystem firmware programming working okay but I cannot use it as debug port. The PEMicro driver keep saying "Port undetedted". It is a problem, but not the question I want to ask here.

 

So I tried to use the SWD connector (J10) with a SEGGER J-LINK adapter. It does not work. When I tried to download firmware, IAR workbench says "failed to reset target processor".

I checked with J-Link commander. Even though it failed to detect target on JTAG/SWD chain, I can reset the KL25 processor when I select SWD interface (command:si 1) and reset (command:r). When I tried HALT command (command:h), the target KL25 reboots many time. I think the SWD pins from KL25 target is conflicted between SEGGER J-Link on SWD connector J10 and on-board OpenSDA K20.

I googled about TWR-KL25 and SWD but no hit. I found another KL25 platform, FRDM-KL25 has J11 trace on bottom layer to isolate OpenSDA from KL25 (actually it disconnects K20 SPI0_CLK from KL25 SWD_CLK). I checked out TWR-KL25 schematics, there is no such provision. Instead the OpenSDA SWD pins of TWR-KL25 is get through 3-state switch (U506 74LVC125ADB) and controlled by K20 GPIO pins, so I think there must be some way to isolate OpenSDA from SWD connector.

 

The users's manual (TWR-KL25-UM) does not mention anything. It simply states "There are two debug interface options provided: the on-board openSDA circuit and an external ARM SWD connector." But apparently, connecting SWD deubugger to J10 without disabling on-board OpenSDA does not work.

Outcomes