# 'Error validating JTAG scan chain, IR mismatch' problem

**URL:** <https://community.sparkfun.com/t/error-validating-jtag-scan-chain-ir-mismatch-problem/2301>\
**Category:** MicroMod\
**Tags:** arm-lpc\
**Created:** [July 28, 2006, 9:09am UTC](https://community.sparkfun.com/t/error-validating-jtag-scan-chain-ir-mismatch-problem/2301 "2006-07-28T09:09:57Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![asgard](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@asgard](https://community.sparkfun.com/u/asgard)\
**Post date:** [September 5, 2006, 9:10am UTC](https://community.sparkfun.com/t/error-validating-jtag-scan-chain-ir-mismatch-problem/2301/21 "2006-09-05T09:10:04Z")

</div>

How can i change the state of TAP? I’m working with str9.

tnx

Lucio

---

<div class="post-metadata">

**Author:** ![Dominic](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Dominic](https://community.sparkfun.com/u/Dominic)\
**Post date:** [September 5, 2006, 9:14am UTC](https://community.sparkfun.com/t/error-validating-jtag-scan-chain-ir-mismatch-problem/2301/22 "2006-09-05T09:14:14Z")

</div>

I don’t think I understand what you want to do. The state of the TAP statemachine is continously changed, while the OpenOCD talks to the target.

Maybe you could explain what you’re trying to achieve.

Regards,

Dominic

---

<div class="post-metadata">

**Author:** ![asgard](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@asgard](https://community.sparkfun.com/u/asgard)\
**Post date:** [September 5, 2006, 9:23am UTC](https://community.sparkfun.com/t/error-validating-jtag-scan-chain-ir-mismatch-problem/2301/23 "2006-09-05T09:23:35Z")

</div>

sorry for the explanation dominic, my problem is :

the scan of IR register performed by amontec demo is 29 instead 01 so openocd returns the error.

A previous post told that maybe the error is caused by a wrong state of TAP.

therefore i ask if is it possible to change that state.

tnx[/quote]

---

<div class="post-metadata">

**Author:** ![alexandre](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@alexandre](https://community.sparkfun.com/u/alexandre)\
**Post date:** [September 5, 2006, 12:31pm UTC](https://community.sparkfun.com/t/error-validating-jtag-scan-chain-ir-mismatch-problem/2301/24 "2006-09-05T12:31:51Z")

</div>

Hi, my config file is this:

# config LPC2138 ARM7TDMI-S

# daemon configuration

telnet\_port 4444

gdb\_port 3333

# interface

interface parport

parport\_cable wiggler

#parport\_layout wiggler

parport\_port /dev/parport0

jtag\_speed 0

# reset\_config [combination] [trst\_type] [srst\_type]

reset\_config trst\_and\_srst srst\_pulls\_trst

# jtag\_device

jtag\_device 4 0x1 0xf 0xe

# target configuration

daemon\_startup reset

# working\_area \<target#\> \<‘backup’|‘nobackup’\>

# working\_area 0 0x40000000 0x4000 nobackup

# target \<jtag#\> [variant]

target arm7tdmi little reset\_run 0 arm7tdmi-s\_r4

# flash bank lpc2000 0 0 \<target#\> [‘calc\_checksum’]

flash bank lpc2000 0x0 0x7D000 0 0 lpc2000\_v2 0 12000 calc\_checksum

When I uncoment the line “working\_area 0 0x40000000 0x4000 nobackup” this error happens:

secchin:/home/alexandre/work# openocd -f arm7tdmi-s.cfg -d

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-08-20 17:00 CEST)

Error: target.c:972 handle\_working\_area\_command(): target number ‘0’ not defined

secchin:/home/alexandre/work#

When I coment this line: “# working\_area 0 0x40000000 0x4000 nobackup” this error happens:

secchin:/home/alexandre/work# openocd -f arm7tdmi-s.cfg -d

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-08-20 17:00 CEST)

Debug: jtag.c:1184 jtag\_init():

Warning: parport.c:367 parport\_init(): No parport port specified, using default ‘0x378’ (LPT1)

Debug: parport.c:373 parport\_init(): requesting privileges for parallel port 0x378…

Debug: parport.c:383 parport\_init(): …privileges granted

Debug: parport.c:210 parport\_reset(): trst: 0, srst: 0

Debug: jtag.c:240 jtag\_call\_event\_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag\_reset\_callback():

Debug: bitbang.c:223 bitbang\_execute\_queue(): statemove end in 0

Debug: jtag.c:240 jtag\_call\_event\_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag\_reset\_callback():

Debug: bitbang.c:237 bitbang\_execute\_queue(): scan end in 0

Debug: jtag.c:957 jtag\_build\_buffer(): fields[0].out\_value: 3f

Debug: jtag.c:988 jtag\_read\_buffer(): fields[0].in\_value: 3f

Error: jtag.c:1123 jtag\_validate\_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 3f

secchin:/home/alexandre/work#

Other thing: The openocd enters in prompt mode for execute the instructions or I am obliged use a script in config file or in another file? I don’t know if openocd enters in prompt mode because it never ran with me!

Remembering that I am using the Wiggler Cable with the ARM7TDMI-S LPC2138.

Thank you.

---

<div class="post-metadata">

**Author:** ![alexandre](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@alexandre](https://community.sparkfun.com/u/alexandre)\
**Post date:** [September 5, 2006, 12:56pm UTC](https://community.sparkfun.com/t/error-validating-jtag-scan-chain-ir-mismatch-problem/2301/25 "2006-09-05T12:56:07Z")

</div>

Other thing:

I already tried to use 0x378 in parport\_port but don’t run. I have the same error!

secchin:/home/alexandre/work# openocd -f arm7tdmi-s.cfg -d

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-08-20 17:00 CEST)

Debug: jtag.c:1184 jtag\_init():

Debug: parport.c:373 parport\_init(): requesting privileges for parallel port 0x378…

Debug: parport.c:383 parport\_init(): …privileges granted

Debug: parport.c:210 parport\_reset(): trst: 0, srst: 0

Debug: jtag.c:240 jtag\_call\_event\_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag\_reset\_callback():

Debug: bitbang.c:223 bitbang\_execute\_queue(): statemove end in 0

Debug: jtag.c:240 jtag\_call\_event\_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag\_reset\_callback():

Debug: bitbang.c:237 bitbang\_execute\_queue(): scan end in 0

Debug: jtag.c:957 jtag\_build\_buffer(): fields[0].out\_value: 3f

Debug: jtag.c:988 jtag\_read\_buffer(): fields[0].in\_value: 3f

Error: jtag.c:1123 jtag\_validate\_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 3f

Thank you.

[Previous page](https://community.sparkfun.com/t/error-validating-jtag-scan-chain-ir-mismatch-problem/2301.md?page=1)
