JTAG Issue with TI Stellaris LM3S1R21 + Olimex USB Tiny

Hi,

As a quick disclaimer, this is my first solo embedded system project, so I’m very worried I’ve made a lot of rookie mistakes. I’ve already run into issues with my voltage regulator (swapped my output and ground pins), which gave me a large power issue in the beginning. I’m unsure if this is the root of my problem (explained below):

I’m building an embedded system project using a TI Stellaris MCU (the 3S1R21 chip), and I’m running into trouble with the JTAG unit. I’m using an Olimex USB Tiny debugger, using OpenOCD on Ubuntu 10.04. I’ve tried to run openOCD against my board, and it always gives me the error:

murtaza@murtaza-laptop:~/Desktop/OpenOCD Files$ openocd -f lm3s8962.cfg -f olimex-jtag-tiny.cfg

Open On-Chip Debugger 0.4.0 (2010-05-11-20:06)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.berlios.de/doc/doxygen/bugs.html

none separate

1000 kHz

Info : clock speed 1000 kHz

Error: JTAG scan chain interrogation failed: all ones

Error: Check JTAG interface, timings, target power, etc.

Error: JTAG scan chain interrogation failed: all ones

Error: Check JTAG interface, timings, target power, etc.

Command handler execution failed

Warn : jtag initialization failed; try ‘jtag init’ again.

I also tried scoping the JTAG pins, and TCLK, TMS and TDI all show some sign of life, but TDO (the MCU output) shows nothing (always high).

As stated above, I’ve already run into power problems, but I’m unsure if it has caused my MCU to burn out. Upon scoping the pins, I’ve seen that in the inactive state, they are pulled high, which is at least consistent with the datasheet.

I’ve tried my computer + JTAG debugger on a separate board, and it seems to work fine. I have not confirmed my openOCD config file, though. Here’s my config file (very heavily borrowed from the Stellaris Dev board config files):

script for lm3s1r21

if { [info exists CHIPNAME] } {

set _CHIPNAME $CHIPNAME

} else {

set _CHIPNAME lm3s

}

if { [info exists ENDIAN] } {

set _ENDIAN $ENDIAN

} else {

set _ENDIAN little

}

Work-area is a space in RAM used for flash programming

By default use 64kB

if { [info exists WORKAREASIZE] } {

set _WORKAREASIZE $WORKAREASIZE

} else {

set _WORKAREASIZE 0x2000

}

reset_config none

jtag_khz 1000

#jtag_rclk 500

jtag_nsrst_delay 100

jtag_ntrst_delay 100

#jtag scan chain

if { [info exists CPUTAPID ] } {

set _CPUTAPID $CPUTAPID

} else {

See LM3S8962 Document

Section xxx

set _CPUTAPID 0x3ba00477

set _CPUTAPID 0x4BA00477

}

jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID

set _TARGETNAME $_CHIPNAME.cpu

target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME -variant lm3s

$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0

#set _FLASHNAME $_CHIPNAME.flash

#flash bank $_FLASHNAME stellaris 0 0 0 0 $_TARGETNAME

For more information about the configuration files, take a look at:

openocd.texi

Here’s a link to my JTAG schematic (20 pin connector, to connect to the Olimex USB Tiny Debugger):

https://picasaweb.google.com/lh/photo/3 … directlink

My concern is, either I’ve botched the JTAG schematic, or my voltage regulator issue ended up frying my MCU. Googling the issue (from the OpenOCD errors given) seems to indicate a hardware problem. Anyone have any ideas? Any help would be greatly appreciated!

Thanks very much for the help!

Murtaza