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.
已解决! 转到解答。
Sasaki-san,
The problem you have described is already known about and 2 workarounds exist to solve it. Please refer to the Tower board errata at:
This should allow you to use the external debug adaptor.
Regards,
Alistair
Sasaki-san,
The problem you have described is already known about and 2 workarounds exist to solve it. Please refer to the Tower board errata at:
This should allow you to use the external debug adaptor.
Regards,
Alistair
Thank you to pointing me eratta document, Mr Muir.
I have TOWER elevator board so I connected USB power from it, confirmed SEGGER J-LINK works either download firmware and debug trace.
Now I have to find way to connect UART to my PC without using on-board OpenSDA UART-USB function. It seems like jumper J24 and J25 can disconnect K25 UART0 pins from K20, route it to elevator connector A43 and A44. So I have to take some soldering on a TWR-PROTO board for RS-232C level converter.
Hi, Sasaki
I think you can do following testing first.
1. Check if you can use OpenSDA to download code.
2. Check if your connection is correct.
I tested TWR-KL25, it can work well.
Best Regards
Paul
Mr Tian,
It is indeed strange that, as I wrote, I can download firmware (.srec file) through OpenSDA virtual USB drive with no problem. It works great.
However when I try to debug the code from IAR workbench (or KEIL uVision), OpenSDA JTAG driver from PE Micro says "port undetected".