What do I need to debug the K20 MCU on Apalis TK1 with JTAG

How can I debug the NXP K20 MCU on Apalis TK1 over JTAG. I’m using the Apalis TK1 board with the Apalis Evaluation Board and an Apalis TK1 Mezzanine Extension.

K20 JTAG pins are not available outside of the module without reworking the module (4pcs. 0402 resistors need to be moved, and you’ll loose EzPort flashing functionality).

Without HW modifications you can try using a bitbanged JTAG from the TK1:

However this approach will disable the SPI communication to the chip.

Are there any detailed descriptions for reworking of the module available? Position of resistors and JTAG signals etc.

Any hardware modifications to the module will void the warranty, as well as possibly make it incompatible with our BSP and disable some features. We don’t officially support JTAG for K20, therefore we may not be able to provide answers to questions you may have.
If you acknowledge those condition and want to continue I can share what modifications are required.

Yes, I know lose of warranty and all other problems. But for our project I want to implement our own CANOpen Stack into the K20 and therefore I would like to use a well known hardware debugger with his own toolchain.

You’ll need to move 4 resistors on the right (mxm connector edge towards you) of K20 (K20 is located in the lower left corner). from lower to upper positions as shown on pictures below


Then you’ll need to populate header X11 on the mezzanine, connect mezzanine's X11 pins 2 and 3 to the carrier-board's X22 pins 5 and 6.
Now K20 jtag/swd should be available on mezzanine’s X9 and X8 connectors, populate the connector of your choosing and connect your external debugger.

Sorry, but I have no access to the pictures

How about now?

Very good!! Thank you!!

I’ve made the changes but my debugger (Segger J-Link) doesn’t work correct. J-Flash tool reported could not reset target. My questions are, is the JTAG-RESET routed from mezzanine to K20? Maybe I have to change R146 and R145 too? I checked and found JTAG-RESET routed to R146.

I’ve used it without the reset line, but if your debugger requires it you’ll need to remove R147, R145 and populate R146.