here's a patch:

The important bit is the reset timing change. Without this things work
but not at all relaibaly. Took us some time to realise that 0 was
wrong. I don't know what the optimum value is but 250 works a hell of
a lot better - a lot of warnings went away

The other half is more controversion. I don' tunderstand the point of
the mechanism to pass in exactly one CPUTAPID or otherwise generate an
error. Is it actually useful? Shouldn't this file be the one that
knows the right answers and supplies them?

I couldn't work out how to pass in two variables with tcl so this is
all a bit crufty now, but you get the idea - we have found two valid
TAPID variants - there may be more. If it was split into vendor, part,
stepping (as it normally is in BDSL files) then somethig smarter could
be done. 

--- /home/wookey/balloon/openocd/git/tcl/target/pxa270.cfg      2009-10-10 
02:18:55.000000000 +0100
+++ pxa270updated.cfg   2009-10-10 02:27:53.000000000 +0100
@@ -12,14 +12,14 @@
    set  _ENDIAN little
 }
 
-#IDs for pxa270. Choose one. Are there others?#
-#set CPUTAPID 0x79265013
-#set CPUTAPID 0x49265013
+#IDs for pxa270. Are there more?
 if { [info exists CPUTAPID ] } {
    set _CPUTAPID $CPUTAPID
+   set _CPUTAPID1 $CPUTAPID
 } else {
-  # force an error till we get a good number
-   set _CPUTAPID 0xffffffff
+  # set useful default
+   set _CPUTAPID 0x49265013
+   set _CPUTAPID1 0x79265013
 }
 
 
@@ -28,7 +28,7 @@
 jtag_nsrst_delay 260
 # set the jtag_ntrst_delay to the delay introduced by a reset circuit
 # the rest of the needed delays are built into the openocd program
-jtag_ntrst_delay 0
+jtag_ntrst_delay 250
 
 set _TARGETNAME $_CHIPNAME.cpu
 jtag newtap $_CHIPNAME cpu -irlen 7 -ircapture 0x1 -irmask 0x7f -expected-id 
$_CPUTAPID


Wookey
-- 
Principal hats:  iEndian - Balloonboard - Toby Churchill - Emdebian
http://wookware.org/
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to