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:
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!
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.
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?
Just some other stuff to look up, I've been told TRST should be pulled low for production and pulled high for debug.
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.
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
Thanks Jason, I will get back when i have tried it!
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.
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:
2 TMS with 10K ohm pull-up resistor
I attach the schematics of K20, pls refer to it.