MK02FN128xxx10 JTAG connection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MK02FN128xxx10 JTAG connection

1,533 Views
enversultanov
Contributor II

Hello!

I am currently working with a custom board with a Freescale MK02FN128xxx10 MCU and my challenge right now is to get a communication between the PC (Windows 8, SEGGER J-Flash V5.10) and the MCU.

The hardware connection between the board and JTAG looks like this:

Board                    JTAG

1. 3.3V                    1. VTref

2. GND                    4. GND    

12. JTAG_TCLK      9. TCK    

13. JTAG_TDI          5. TDI

14. JTAG_TDO        13. TDO 

15. JTAG_TMS         7.TMS     

19. RESET_b            15. RESET

For the generated error, see the attached picture.

I have also observed the RESET pin on the board which keep toggling.

I would appreciate an instruction on how to connect the JTAG pins on this MCU.

  Thx for the help!

Tags (3)
0 Kudos
6 Replies

1,261 Views
jasonphilippi
Contributor III

The J-Link EDU uses a 20-Pin ARM Standard JTAG Connector (20-Pin IDC Connector). xiangjun.rong​ is referencing the 20-Pin Cortex Debug + ETM Connector.

I assume you are using the 20-pin IDC Connector.

http://infocenter.arm.com/help/topic/com.arm.doc.faqs/attached/13634/cortex_debug_connectors.pdf

From your picture, it looks like your device has been secured. Which means, the chip has been flashed with code that disables any new code from the JTAG.

Is this the first time you have attempted to program it?

-Edit

Just some other stuff to look up, I've been told TRST should be pulled low for production and pulled high for debug.

0 Kudos

1,261 Views
enversultanov
Contributor II

Hi Jason!

Thanks for the response. The board I'm using does not have any specific debug or JTAG connectors. Al 32 pins on the MCU are accessible and I'm connecting pin by pin to J-Link EDU.

Yes you are correct, the MCU is secured/in factory mode. I managed to get a connection with it by:

* Powering off MCU

* Setting Reset low

* Powering on

* Running J-Link Commander

I also found a script to unsecure the device but that doesn't work. The error i get from the J-Link Commander says the MCU could not halt. I suspect that I need to design a reset pin on the MCU for the script to work.

0 Kudos

1,261 Views
jasonphilippi
Contributor III

Check this article out. If you were able to connect by physically hitting the reset, then this might help.

Hardware Reset for ARM Cortex-M with Segger J-Link and Kinetis Design Studio | MCU on Eclipse

0 Kudos

1,261 Views
enversultanov
Contributor II

Thanks Jason, I will get back when i have tried it!

0 Kudos

1,261 Views
enversultanov
Contributor II

Thanks for the reply but i think you have misunderstood me. I have basically a k02 mcu and a J-Link EDU.

Your sugested pinouts does not comply with the datasheet. Why do you refer to K20 schematics? My MCU is K02.

//Enver

0 Kudos

1,261 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Enver,

I suspect that your pin assignment of the 20 pins JTAG connector is incorrect. for example for the 20 pins JTAG connector, this is the pin assignment:

Pin            assignment:

1                3.3V

3,5,15,17,19    GND

2                TMS with 10K ohm pull-up resistor

4                TCK

6                TDO

8                TDI

10              Reset

I attach the schematics of K20, pls refer to it.

BR

XiangJun Rong

0 Kudos