sobota, 23 sierpnia 2014

Launchpad as external debugger with JTAG interface.

All of development boards and starter kits like Lanuchpads form TI got build in ICDI (In Circuit Debug Interface). It allows to download your code to the microcontroller placed on the board, so you can program it and debug. The ICDI also gives you ability to program external micorcontrollers, mounted in your device. In this post you will find usefull information about programming microcontrollers build into your device. As an example TM4C123GH6PMI microcontroller was used.

So in your design, you should put the JTAG or SWI interface on the board. It's recomended the JTAG/SWI interface should be placed close to microcontroller. In datasheet on page 199, are presented which pins are used for JTAG or SWI interface. See the picture below to see how to wire interface to uC.
 As you can see jtag connector is wired to 49 50 51 52 pins.Also i'm using UART interface which is connected to 17 18 pin of uC TM4C123GH6PMI with UART TX and RX pins of launchpad.

In ARM INFOCENTER, you can find information that it's good to apply pull up and pull down resistors. Recommended value is 10k. Also i've tested JTAG interface connection without pull resistors, on short wires and it's work properly. But it will be better to provide proper working conditions, so i strongly suggest you to do use it and do not left them floating! Remeber that TCK(TCLK) "must have a pull-down to enable hot swap and post-mortem debugging".

It's time to use debugger. Solder goldpins or wires to pads in your launchpad. I've marked this pads in the picture below. Pads got labels underneath which describes JTAG interface pins. ICDI works in two modes: debug in and debug out, as you can read in TI WIKI. If you want program external chip, you must remove power jumper - i've marked it by green circle. The last step is to connect debuger to your device and download the code. You can do this by using CCS or LM Flash. In lm flash programmer you must setup which programmer you are using in quick setup popup menu. Choose interface as ICDI and PORT. 

Remember that EXT-DBG must be low (connected to ground) if you got connected to external device, and you are using icdi in debug in mode. For debug out mode this pin can be left floating - just left it in the air.

Brak komentarzy:

Prześlij komentarz