rename jtag_khz as adapter_khz

Globally rename "jtag_khz" as "adapter_khz", and move it out of the "jtag"
command group ...  it needs to be used with non-JTAG transports

Includes a migration aid (in jtag/startup.tcl) so that old user scripts
won't break.  That aid should Sunset in about a year.  (We may want to
update it to include a nag message too.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
__archive__
David Brownell 2010-03-15 08:37:43 -07:00
parent 4b964a81ca
commit 96f9790279
49 changed files with 111 additions and 96 deletions

5
NEWS
View File

@ -5,6 +5,11 @@ and other issues not mentioned here.
JTAG Layer: JTAG Layer:
New driver for "Bus Pirate" New driver for "Bus Pirate"
Rename various commands so they're not JTAG-specific
There are migration procedures for these, but you should
convert your scripts to the new names, since those procedures
will not be around forever.
jtag_khz ... is now adapter_khz
Boundary Scan: Boundary Scan:

View File

@ -1516,7 +1516,7 @@ solution just avoids using that instruction with JTAG debuggers.
If both the chip and the board support adaptive clocking, If both the chip and the board support adaptive clocking,
use the @command{jtag_rclk} use the @command{jtag_rclk}
command, in case your board is used with JTAG adapter which command, in case your board is used with JTAG adapter which
also supports it. Otherwise use @command{jtag_khz}. also supports it. Otherwise use @command{adapter_khz}.
Set the slow rate at the beginning of the reset sequence, Set the slow rate at the beginning of the reset sequence,
and the faster rate as soon as the clocks are at full speed. and the faster rate as soon as the clocks are at full speed.
@ -2342,7 +2342,7 @@ you may encounter a problem.
@deffn Command {parport_toggling_time} [nanoseconds] @deffn Command {parport_toggling_time} [nanoseconds]
Displays how many nanoseconds the hardware needs to toggle TCK; Displays how many nanoseconds the hardware needs to toggle TCK;
the parport driver uses this value to obey the the parport driver uses this value to obey the
@command{jtag_khz} configuration. @command{adapter_khz} configuration.
When the optional @var{nanoseconds} parameter is given, When the optional @var{nanoseconds} parameter is given,
that setting is changed before displaying the current value. that setting is changed before displaying the current value.
@ -2353,7 +2353,7 @@ To measure the toggling time with a logic analyzer or a digital storage
oscilloscope, follow the procedure below: oscilloscope, follow the procedure below:
@example @example
> parport_toggling_time 1000 > parport_toggling_time 1000
> jtag_khz 500 > adapter_khz 500
@end example @end example
This sets the maximum JTAG clock speed of the hardware, but This sets the maximum JTAG clock speed of the hardware, but
the actual speed probably deviates from the requested 500 kHz. the actual speed probably deviates from the requested 500 kHz.
@ -2364,14 +2364,14 @@ Update the setting to match your measurement:
@example @example
> parport_toggling_time <measured nanoseconds> > parport_toggling_time <measured nanoseconds>
@end example @end example
Now the clock speed will be a better match for @command{jtag_khz rate} Now the clock speed will be a better match for @command{adapter_khz rate}
commands given in OpenOCD scripts and event handlers. commands given in OpenOCD scripts and event handlers.
You can do something similar with many digital multimeters, but note You can do something similar with many digital multimeters, but note
that you'll probably need to run the clock continuously for several that you'll probably need to run the clock continuously for several
seconds before it decides what clock rate to show. Adjust the seconds before it decides what clock rate to show. Adjust the
toggling time up or down until the measured clock rate is a good toggling time up or down until the measured clock rate is a good
match for the jtag_khz rate you specified; be conservative. match for the adapter_khz rate you specified; be conservative.
@end quotation @end quotation
@end deffn @end deffn
@ -2470,10 +2470,10 @@ However, it introduces delays to synchronize clocks; so it
may not be the fastest solution. may not be the fastest solution.
@b{NOTE:} Script writers should consider using @command{jtag_rclk} @b{NOTE:} Script writers should consider using @command{jtag_rclk}
instead of @command{jtag_khz}, but only for (ARM) cores and boards instead of @command{adapter_khz}, but only for (ARM) cores and boards
which support adaptive clocking. which support adaptive clocking.
@deffn {Command} jtag_khz max_speed_kHz @deffn {Command} adapter_khz max_speed_kHz
A non-zero speed is in KHZ. Hence: 3000 is 3mhz. A non-zero speed is in KHZ. Hence: 3000 is 3mhz.
JTAG interfaces usually support a limited number of JTAG interfaces usually support a limited number of
speeds. The speed actually used won't be faster speeds. The speed actually used won't be faster
@ -3881,7 +3881,7 @@ the target clocks are fully set up.)
before @command{reset_init} is called. before @command{reset_init} is called.
This is the most robust place to use @command{jtag_rclk} This is the most robust place to use @command{jtag_rclk}
or @command{jtag_khz} to switch to a low JTAG clock rate, or @command{adapter_khz} to switch to a low JTAG clock rate,
when reset disables PLLs needed to use a fast clock. when reset disables PLLs needed to use a fast clock.
@ignore @ignore
@item @b{reset-wait-pos} @item @b{reset-wait-pos}
@ -7290,7 +7290,7 @@ To set the JTAG frequency use the command:
@example @example
# Example: 1.234MHz # Example: 1.234MHz
jtag_khz 1234 adapter_khz 1234
@end example @end example

View File

@ -1556,7 +1556,7 @@ unsigned jtag_get_speed_khz(void)
return speed_khz; return speed_khz;
} }
static int jtag_khz_to_speed(unsigned khz, int* speed) static int adapter_khz_to_speed(unsigned khz, int* speed)
{ {
LOG_DEBUG("convert khz to interface specific speed value"); LOG_DEBUG("convert khz to interface specific speed value");
speed_khz = khz; speed_khz = khz;
@ -1576,11 +1576,11 @@ static int jtag_khz_to_speed(unsigned khz, int* speed)
static int jtag_rclk_to_speed(unsigned fallback_speed_khz, int* speed) static int jtag_rclk_to_speed(unsigned fallback_speed_khz, int* speed)
{ {
int retval = jtag_khz_to_speed(0, speed); int retval = adapter_khz_to_speed(0, speed);
if ((ERROR_OK != retval) && fallback_speed_khz) if ((ERROR_OK != retval) && fallback_speed_khz)
{ {
LOG_DEBUG("trying fallback speed..."); LOG_DEBUG("trying fallback speed...");
retval = jtag_khz_to_speed(fallback_speed_khz, speed); retval = adapter_khz_to_speed(fallback_speed_khz, speed);
} }
return retval; return retval;
} }
@ -1598,7 +1598,7 @@ int jtag_config_khz(unsigned khz)
LOG_DEBUG("handle jtag khz"); LOG_DEBUG("handle jtag khz");
clock_mode = CLOCK_MODE_KHZ; clock_mode = CLOCK_MODE_KHZ;
int speed = 0; int speed = 0;
int retval = jtag_khz_to_speed(khz, &speed); int retval = adapter_khz_to_speed(khz, &speed);
return (ERROR_OK != retval) ? retval : jtag_set_speed(speed); return (ERROR_OK != retval) ? retval : jtag_set_speed(speed);
} }
@ -1621,7 +1621,7 @@ int jtag_get_speed(void)
speed = jtag_speed; speed = jtag_speed;
break; break;
case CLOCK_MODE_KHZ: case CLOCK_MODE_KHZ:
jtag_khz_to_speed(jtag_get_speed_khz(), &speed); adapter_khz_to_speed(jtag_get_speed_khz(), &speed);
break; break;
case CLOCK_MODE_RCLK: case CLOCK_MODE_RCLK:
jtag_rclk_to_speed(rclk_fallback_speed_khz, &speed); jtag_rclk_to_speed(rclk_fallback_speed_khz, &speed);

View File

@ -680,7 +680,7 @@ static struct bitq_interface presto_bitq = {
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
static int presto_jtag_khz(int khz, int *jtag_speed) static int presto_adapter_khz(int khz, int *jtag_speed)
{ {
if (khz < 0) if (khz < 0)
{ {
@ -797,7 +797,7 @@ struct jtag_interface presto_interface = {
.execute_queue = bitq_execute_queue, .execute_queue = bitq_execute_queue,
.speed = presto_jtag_speed, .speed = presto_jtag_speed,
.khz = presto_jtag_khz, .khz = presto_adapter_khz,
.speed_div = presto_jtag_speed_div, .speed_div = presto_jtag_speed_div,
.init = presto_jtag_init, .init = presto_jtag_init,
.quit = presto_jtag_quit, .quit = presto_jtag_quit,

View File

@ -75,3 +75,12 @@ add_help_text srst_deasserted "Overridable procedure run when srst deassert is d
proc srst_asserted {} { proc srst_asserted {} {
puts "Sensed nSRST asserted." puts "Sensed nSRST asserted."
} }
# BEGIN MIGRATION AIDS ... these adapter operations originally had
# JTAG-specific names despite the fact that the operations were not
# specific to JTAG.
#
# FIXME phase these aids out after about April 2011
#
proc jtag_khz args { eval adapter_khz $args }
# END MIGRATION AIDS

View File

@ -1351,7 +1351,7 @@ COMMAND_HANDLER(handle_jtag_ntrst_assert_width_command)
return ERROR_OK; return ERROR_OK;
} }
COMMAND_HANDLER(handle_jtag_khz_command) COMMAND_HANDLER(handle_adapter_khz_command)
{ {
if (CMD_ARGC > 1) if (CMD_ARGC > 1)
return ERROR_COMMAND_SYNTAX_ERROR; return ERROR_COMMAND_SYNTAX_ERROR;
@ -1608,6 +1608,16 @@ COMMAND_HANDLER(handle_tms_sequence_command)
} }
static const struct command_registration interface_command_handlers[] = { static const struct command_registration interface_command_handlers[] = {
{
.name = "adapter_khz",
.handler = handle_adapter_khz_command,
.mode = COMMAND_ANY,
.help = "With an argument, change to the specified maximum "
"jtag speed. For JTAG, 0 KHz signifies adaptive "
" clocking. "
"With or without argument, display current setting.",
.usage = "[khz]",
},
{ {
.name = "interface", .name = "interface",
.handler = handle_interface_command, .handler = handle_interface_command,
@ -1636,15 +1646,6 @@ int interface_register_commands(struct command_context *ctx)
} }
static const struct command_registration jtag_command_handlers[] = { static const struct command_registration jtag_command_handlers[] = {
{
.name = "jtag_khz",
.handler = handle_jtag_khz_command,
.mode = COMMAND_ANY,
.help = "With an argument, change to the specified maximum "
"jtag speed. Pass 0 to require adaptive clocking. "
"With or without argument, display current setting.",
.usage = "[khz]",
},
{ {
.name = "jtag_rclk", .name = "jtag_rclk",
.handler = handle_jtag_rclk_command, .handler = handle_jtag_rclk_command,

View File

@ -880,7 +880,7 @@ static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str)
// TODO: set jtag speed to // TODO: set jtag speed to
if (svf_para.frequency > 0) if (svf_para.frequency > 0)
{ {
command_run_linef(cmd_ctx, "jtag_khz %d", (int)svf_para.frequency / 1000); command_run_linef(cmd_ctx, "adapter_khz %d", (int)svf_para.frequency / 1000);
LOG_DEBUG("\tfrequency = %f", svf_para.frequency); LOG_DEBUG("\tfrequency = %f", svf_para.frequency);
} }
} }

View File

@ -65,4 +65,4 @@ $_TARGETNAME configure -event reset-init {
} }
# This target is pretty snappy... # This target is pretty snappy...
jtag_khz 16000 adapter_khz 16000

View File

@ -15,7 +15,7 @@ flash_bank cfi 0x10000000 0x00200000 2 2 0
proc at91rm9200_dk_init { } { proc at91rm9200_dk_init { } {
# Try to run at 1khz... Yea, that slow! # Try to run at 1khz... Yea, that slow!
# Chip is really running @ 32khz # Chip is really running @ 32khz
jtag_khz 8 adapter_khz 8
mww 0xfffffc64 0xffffffff mww 0xfffffc64 0xffffffff
## disable all clocks but system clock ## disable all clocks but system clock
@ -41,7 +41,7 @@ proc at91rm9200_dk_init { } {
#======================================== #========================================
# CPU now runs at 180mhz # CPU now runs at 180mhz
# SYS runs at 60mhz. # SYS runs at 60mhz.
jtag_khz 40000 adapter_khz 40000
#======================================== #========================================

View File

@ -77,7 +77,7 @@ proc at91sam9g20_init { } {
# means the master clock (MCLK) must be at or below 133 MHz or timing errors will occur. The processor # means the master clock (MCLK) must be at or below 133 MHz or timing errors will occur. The processor
# core can operate up to 400 MHz and therefore PCLK must be at or below this to function properly. # core can operate up to 400 MHz and therefore PCLK must be at or below this to function properly.
jtag_khz 2 # Slow-speed oscillator enabled at reset, so run jtag speed slow. adapter_khz 2 # Slow-speed oscillator enabled at reset, so run jtag speed slow.
halt # Make sure processor is halted, or error will result in following steps. halt # Make sure processor is halted, or error will result in following steps.
mww 0xfffffd08 0xa5000501 # RSTC_MR : enable user reset. mww 0xfffffd08 0xa5000501 # RSTC_MR : enable user reset.
mww 0xfffffd44 0x00008000 # WDT_MR : disable watchdog. mww 0xfffffd44 0x00008000 # WDT_MR : disable watchdog.
@ -112,7 +112,7 @@ proc at91sam9g20_init { } {
# Switch over to adaptive clocking. # Switch over to adaptive clocking.
jtag_khz 0 adapter_khz 0
# Enable faster DCC downloads. # Enable faster DCC downloads.

View File

@ -19,7 +19,7 @@ if { [info exists ETM_DRIVER] } {
proc csb337_clk_init { } { proc csb337_clk_init { } {
# CPU is in Slow Clock Mode (32KiHz) ... needs slow JTAG clock # CPU is in Slow Clock Mode (32KiHz) ... needs slow JTAG clock
jtag_khz 8 adapter_khz 8
# CKGR_MOR: start main oscillator (3.6864 MHz) # CKGR_MOR: start main oscillator (3.6864 MHz)
mww 0xfffffc20 0xff01 mww 0xfffffc20 0xff01
@ -37,7 +37,7 @@ proc csb337_clk_init { } {
sleep 20 sleep 20
# CPU is in Normal Mode ... allows faster JTAG clock speed # CPU is in Normal Mode ... allows faster JTAG clock speed
jtag_khz 40000 adapter_khz 40000
} }
proc csb337_nor_init { } { proc csb337_nor_init { } {

View File

@ -103,7 +103,7 @@ proc dm365evm_init {} {
echo "Initialize DM365 EVM board" echo "Initialize DM365 EVM board"
# CLKIN = 24 MHz ... can't talk quickly to ARM yet # CLKIN = 24 MHz ... can't talk quickly to ARM yet
jtag_khz 1500 adapter_khz 1500
# FIXME -- PLL init # FIXME -- PLL init

View File

@ -4,7 +4,7 @@
# http://www.luminarymicro.com/products/lm3s1968_evaluation_kits.html # http://www.luminarymicro.com/products/lm3s1968_evaluation_kits.html
# NOTE: to use J-Link instead of the on-board interface, # NOTE: to use J-Link instead of the on-board interface,
# you may also need to reduce jtag_khz to be about 1200. # you may also need to reduce adapter_khz to be about 1200.
# source [find interface/jlink.cfg] # source [find interface/jlink.cfg]
# include the FT2232 interface config for on-board JTAG interface # include the FT2232 interface config for on-board JTAG interface
@ -14,7 +14,7 @@ source [find interface/luminary.cfg]
source [find target/lm3s1968.cfg] source [find target/lm3s1968.cfg]
# jtag speed # jtag speed
jtag_khz 3000 adapter_khz 3000
jtag_nsrst_delay 100 jtag_nsrst_delay 100

View File

@ -10,7 +10,7 @@ source [find interface/luminary.cfg]
source [find target/lm3s811.cfg] source [find target/lm3s811.cfg]
# jtag speed # jtag speed
jtag_khz 500 adapter_khz 500
jtag_nsrst_delay 100 jtag_nsrst_delay 100

View File

@ -9,7 +9,7 @@ source [find interface/luminary-icdi.cfg]
source [find target/lm3s9b9x.cfg] source [find target/lm3s9b9x.cfg]
# jtag speed # jtag speed
jtag_khz 500 adapter_khz 500
jtag_nsrst_delay 100 jtag_nsrst_delay 100

View File

@ -26,7 +26,7 @@ jtag_ntrst_delay 300
arm7_9 fast_memory_access enable arm7_9 fast_memory_access enable
arm7_9 dcc_downloads enable arm7_9 dcc_downloads enable
jtag_khz 16000 adapter_khz 16000
# Target events # Target events

View File

@ -7,7 +7,7 @@ jtag_ntrst_delay 1
# Maximum of 1/8 of clock frequency (XTAL = 16 MHz). # Maximum of 1/8 of clock frequency (XTAL = 16 MHz).
# Adaptive clocking through RTCK is not supported. # Adaptive clocking through RTCK is not supported.
jtag_khz 2000 adapter_khz 2000
# Target device: LPC29xx with ETB # Target device: LPC29xx with ETB
# The following variables are used by the LPC2900 script: # The following variables are used by the LPC2900 script:
@ -24,7 +24,7 @@ $_TARGETNAME configure -work-area-phys 0x58000000 -work-area-size 0x10000 -work-
# Event handlers # Event handlers
$_TARGETNAME configure -event reset-start { $_TARGETNAME configure -event reset-start {
# Back to the slow JTAG clock # Back to the slow JTAG clock
jtag_khz 2000 adapter_khz 2000
} }
# External 16-bit flash at chip select CS7 (SST39VF3201-70, 4 MiB) # External 16-bit flash at chip select CS7 (SST39VF3201-70, 4 MiB)
@ -46,7 +46,7 @@ $_TARGETNAME configure -event reset-init {
mww 0xFFFF8070 0x02000000 # SYS_CLK_CONF: PLL mww 0xFFFF8070 0x02000000 # SYS_CLK_CONF: PLL
# Increase JTAG speed # Increase JTAG speed
jtag_khz 6000 adapter_khz 6000
# Enable external memory bus (16-bit SRAM at CS6, 16-bit flash at CS7) # Enable external memory bus (16-bit SRAM at CS6, 16-bit flash at CS7)
mww 0xE0001138 0x0000001F # P1.14 = D0 mww 0xE0001138 0x0000001F # P1.14 = D0

View File

@ -5,7 +5,7 @@
source [find interface/hitex_str9-comstick.cfg] source [find interface/hitex_str9-comstick.cfg]
# set jtag speed # set jtag speed
jtag_khz 3000 adapter_khz 3000
jtag_nsrst_delay 100 jtag_nsrst_delay 100
jtag_ntrst_delay 100 jtag_ntrst_delay 100

View File

@ -8,7 +8,7 @@ proc imx27lnst_init { } {
# This setup puts RAM at 0xA0000000 # This setup puts RAM at 0xA0000000
# reset the board correctly # reset the board correctly
jtag_khz 500 adapter_khz 500
reset run reset run
reset halt reset halt

View File

@ -121,7 +121,7 @@ reset_config trst_and_srst
# IMPORTANT! See README at top of this file. # IMPORTANT! See README at top of this file.
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
jtag_khz 12000 adapter_khz 12000
jtag interface jtag interface
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@ source [find target/lpc3250.cfg]
jtag_nsrst_delay 200 jtag_nsrst_delay 200
jtag_ntrst_delay 1 jtag_ntrst_delay 1
jtag_khz 200 adapter_khz 200
reset_config trst_and_srst separate reset_config trst_and_srst separate
arm7_9 dcc_downloads enable arm7_9 dcc_downloads enable
@ -11,11 +11,11 @@ $_TARGETNAME configure -event gdb-attach { reset init }
$_TARGETNAME configure -event reset-start { $_TARGETNAME configure -event reset-start {
arm7_9 fast_memory_access disable arm7_9 fast_memory_access disable
jtag_khz 200 adapter_khz 200
} }
$_TARGETNAME configure -event reset-end { $_TARGETNAME configure -event reset-end {
jtag_khz 6000 adapter_khz 6000
arm7_9 fast_memory_access enable arm7_9 fast_memory_access enable
} }

View File

@ -26,11 +26,11 @@ reset_config trst_and_srst separate
# issue telnet: reset init # issue telnet: reset init
# issue gdb: monitor reset init # issue gdb: monitor reset init
$_TARGETNAME configure -event reset-init { $_TARGETNAME configure -event reset-init {
jtag_khz 100 adapter_khz 100
# this will setup Telo board # this will setup Telo board
setupTelo setupTelo
#turn up the JTAG speed #turn up the JTAG speed
jtag_khz 3000 adapter_khz 3000
puts "JTAG speek now 3MHz" puts "JTAG speek now 3MHz"
puts "type helpC100 to get help on C100" puts "type helpC100 to get help on C100"
} }

View File

@ -99,7 +99,7 @@ proc topas910_init { } {
mww 0xf4300004 0x00000000 mww 0xf4300004 0x00000000
sleep 10 sleep 10
# jtag_khz NNNN # adapter_khz NNNN
# remap off in case of IROM boot # remap off in case of IROM boot
mww 0xf0000004 0x00000001 mww 0xf0000004 0x00000001

View File

@ -105,7 +105,7 @@ proc topasa900_init { } {
mww 0xf4300004 0x00000000 mww 0xf4300004 0x00000000
sleep 10 sleep 10
# jtag_khz NNNN # adapter_khz NNNN
# remap off in case of IROM boot # remap off in case of IROM boot
mww 0xf0000004 0x00000001 mww 0xf0000004 0x00000001

View File

@ -66,7 +66,7 @@ $_TARGETNAME configure -event reset-init {
# other things than flash programming. # other things than flash programming.
$_TARGETNAME configure -work-area-phys 0x00020000 -work-area-size 0x20000 -work-area-backup 0 $_TARGETNAME configure -work-area-phys 0x00020000 -work-area-size 0x20000 -work-area-backup 0
jtag_khz 16000 adapter_khz 16000
proc production_info {} { proc production_info {} {

View File

@ -8,4 +8,4 @@ interface usb_blaster
# These are already the defaults. # These are already the defaults.
# usb_blaster_vid_pid 0x09FB 0x6001 # usb_blaster_vid_pid 0x09FB 0x6001
# usb_blaster_device_desc "USB-Blaster" # usb_blaster_device_desc "USB-Blaster"
jtag_khz 3000 adapter_khz 3000

View File

@ -8,5 +8,5 @@ interface ft2232
ft2232_device_desc "OOCDLink" ft2232_device_desc "OOCDLink"
ft2232_layout oocdlink ft2232_layout oocdlink
ft2232_vid_pid 0x0403 0xbaf8 ft2232_vid_pid 0x0403 0xbaf8
jtag_khz 5 adapter_khz 5

View File

@ -8,5 +8,5 @@ interface ft2232
ft2232_layout sheevaplug ft2232_layout sheevaplug
ft2232_vid_pid 0x0403 0x9e90 ft2232_vid_pid 0x0403 0x9e90
ft2232_device_desc "OpenRD JTAGKey FT2232D B" ft2232_device_desc "OpenRD JTAGKey FT2232D B"
jtag_khz 3000 adapter_khz 3000

View File

@ -8,5 +8,5 @@ interface ft2232
ft2232_layout sheevaplug ft2232_layout sheevaplug
ft2232_vid_pid 0x9e88 0x9e8f ft2232_vid_pid 0x9e88 0x9e8f
ft2232_device_desc "SheevaPlug JTAGKey FT2232D B" ft2232_device_desc "SheevaPlug JTAGKey FT2232D B"
jtag_khz 2000 adapter_khz 2000

View File

@ -7,5 +7,5 @@
interface usb_blaster interface usb_blaster
usb_blaster_vid_pid 0x16C0 0x06AD usb_blaster_vid_pid 0x16C0 0x06AD
usb_blaster_device_desc "USB-JTAG-IF" usb_blaster_device_desc "USB-JTAG-IF"
jtag_khz 3000 adapter_khz 3000

View File

@ -19,7 +19,7 @@ vsllink_usb_bulkout 0x03
vsllink_usb_interface 1 vsllink_usb_interface 1
# vsllink mode, dma or normal # vsllink mode, dma or normal
# for low jtag_khz, use normal # for low adapter_khz, use normal
# for high jtag_khz, use dma # for high adapter_khz, use dma
#vsllink_mode dma #vsllink_mode dma
vsllink_mode normal vsllink_mode normal

View File

@ -1,7 +1,7 @@
jtag_khz 4 adapter_khz 4
###################################### ######################################
@ -62,7 +62,7 @@ flash bank $_FLASHNAME cfi 0x10000000 0x01000000 2 2 $_TARGETNAME
proc at91sam_init { } { proc at91sam_init { } {
# at reset chip runs at 32khz # at reset chip runs at 32khz
jtag_khz 8 adapter_khz 8
halt halt
mww 0xfffffd08 0xa5000501 # RSTC_MR : enable user reset mww 0xfffffd08 0xa5000501 # RSTC_MR : enable user reset
mww 0xfffffd44 0x00008000 # WDT_MR : disable watchdog mww 0xfffffd44 0x00008000 # WDT_MR : disable watchdog
@ -79,7 +79,7 @@ proc at91sam_init { } {
sleep 10 # wait 10 ms sleep 10 # wait 10 ms
# Now run at anything fast... ie: 10mhz! # Now run at anything fast... ie: 10mhz!
jtag_khz 10000 # Increase JTAG Speed to 6 MHz adapter_khz 10000 # Increase JTAG Speed to 6 MHz
arm7_9 dcc_downloads enable # Enable faster DCC downloads arm7_9 dcc_downloads enable # Enable faster DCC downloads
mww 0xffffec00 0x0a0a0a0a # SMC_SETUP0 : Setup SMC for Intel NOR Flash JS28F128P30T85 128MBit mww 0xffffec00 0x0a0a0a0a # SMC_SETUP0 : Setup SMC for Intel NOR Flash JS28F128P30T85 128MBit

View File

@ -3,7 +3,7 @@
# this script only configures one core (that is used to run Linux) # this script only configures one core (that is used to run Linux)
# assume no PLL lock, start slowly # assume no PLL lock, start slowly
jtag_khz 100 adapter_khz 100
if { [info exists CHIPNAME] } { if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME set _CHIPNAME $CHIPNAME

View File

@ -504,7 +504,7 @@ proc reboot {} {
mww $TIMER_WDT_HIGH_BOUND 0xffffff mww $TIMER_WDT_HIGH_BOUND 0xffffff
mww $TIMER_WDT_CURRENT_COUNT 0x0 mww $TIMER_WDT_CURRENT_COUNT 0x0
puts "JTAG speed lowered to 100kHz" puts "JTAG speed lowered to 100kHz"
jtag_khz 100 adapter_khz 100
mww $TIMER_WDT_CONTROL 0x1 mww $TIMER_WDT_CONTROL 0x1
# wait until the reset # wait until the reset
puts -nonewline "Wating for watchdog to trigger..." puts -nonewline "Wating for watchdog to trigger..."

View File

@ -22,7 +22,7 @@ if { [info exists CPUTAPID ] } {
} }
#jtag speed #jtag speed
jtag_khz 4500 adapter_khz 4500
#has only srst #has only srst
reset_config srst_only reset_config srst_only

View File

@ -13,7 +13,7 @@ if { [info exists CPUTAPID ] } {
} }
# jtag speed # jtag speed
jtag_khz 500 adapter_khz 500
jtag_nsrst_delay 100 jtag_nsrst_delay 100
jtag_ntrst_delay 100 jtag_ntrst_delay 100

View File

@ -27,7 +27,7 @@ reset_config trst_and_srst srst_pulls_trst
jtag_nsrst_delay 100 jtag_nsrst_delay 100
jtag_ntrst_delay 100 jtag_ntrst_delay 100
jtag_khz 1000 adapter_khz 1000
#jtag scan chain #jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID

View File

@ -47,4 +47,4 @@ set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME lpc2000 0x0 0x0007D000 0 0 $_TARGETNAME lpc2000_v2 4000 calc_checksum flash bank $_FLASHNAME lpc2000 0x0 0x0007D000 0 0 $_TARGETNAME lpc2000_v2 4000 calc_checksum
# 4MHz / 6 = 666kHz, so use 500 # 4MHz / 6 = 666kHz, so use 500
jtag_khz 500 adapter_khz 500

View File

@ -36,7 +36,7 @@ jtag_ntrst_delay 200
# rclk hasn't been working well. This maybe the mc13224v or something else. # rclk hasn't been working well. This maybe the mc13224v or something else.
#jtag_rclk 2000 #jtag_rclk 2000
jtag_khz 2000 adapter_khz 2000
###################### ######################
# Target configuration # Target configuration

View File

@ -4,7 +4,7 @@
set _ENDIAN little set _ENDIAN little
# jtag speed # jtag speed
jtag_khz 4500 adapter_khz 4500
reset_config srst_only reset_config srst_only
jtag_nsrst_delay 100 jtag_nsrst_delay 100
@ -27,7 +27,7 @@ flash bank $_FLASHNAME avr 0 0 0 0 $_TARGETNAME
#to use it, script will be like: #to use it, script will be like:
#init #init
#jtag_khz 4500 #adapter_khz 4500
#reset init #reset init
#verify_ircapture disable #verify_ircapture disable
# #

View File

@ -28,8 +28,8 @@ target create $_TARGETNAME xscale -endian $_ENDIAN \
# PXA255 comes out of reset using 3.6864 MHz oscillator. # PXA255 comes out of reset using 3.6864 MHz oscillator.
# Until the PLL kicks in, keep the JTAG clock slow enough # Until the PLL kicks in, keep the JTAG clock slow enough
# that we get no errors. # that we get no errors.
jtag_khz 300 adapter_khz 300
$_TARGETNAME configure -event "reset-start" { jtag_khz 300 } $_TARGETNAME configure -event "reset-start" { adapter_khz 300 }
# both TRST and SRST are *required* for debug # both TRST and SRST are *required* for debug
# DCSR is often accessed with SRST active # DCSR is often accessed with SRST active

View File

@ -26,12 +26,12 @@ assumed that all write-protect mechanisms should be disabled.
flash write_image [file] <parameters> flash write_image [file] <parameters>
verify_image [file] <parameters> verify_image [file] <parameters>
4. jtag_khz sets the maximum speed (or alternatively RCLK). If invoked 4. adapter_khz sets the maximum speed (or alternatively RCLK). If invoked
multiple times only the last setting is used. multiple times only the last setting is used.
interface/xxx.cfg files are always executed *before* target/xxx.cfg interface/xxx.cfg files are always executed *before* target/xxx.cfg
files, so any jtag_khz in interface/xxx.cfg will be overridden by files, so any adapter_khz in interface/xxx.cfg will be overridden by
target/xxx.cfg. jtag_khz in interface/xxx.cfg would then, effectively, target/xxx.cfg. adapter_khz in interface/xxx.cfg would then, effectively,
set the default JTAG speed. set the default JTAG speed.
Note that a target/xxx.cfg file can invoke another target/yyy.cfg file, Note that a target/xxx.cfg file can invoke another target/yyy.cfg file,

View File

@ -7,11 +7,11 @@
# #
# RCLK? # RCLK?
# #
# jtag_khz 0 # adapter_khz 0
# #
# Really low clock during reset? # Really low clock during reset?
# #
# jtag_khz 1 # adapter_khz 1
if { [info exists CHIPNAME] } { if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME set _CHIPNAME $CHIPNAME

View File

@ -41,8 +41,8 @@ $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x2000
# NOTE: this may be increased by a reset-init handler, after it # NOTE: this may be increased by a reset-init handler, after it
# configures and enables the PLL. Or you might need to decrease # configures and enables the PLL. Or you might need to decrease
# this, if you're using a slower clock. # this, if you're using a slower clock.
jtag_khz 500 adapter_khz 500
$_TARGETNAME configure -event reset-start {jtag_khz 500} $_TARGETNAME configure -event reset-start {adapter_khz 500}
# flash configuration ... autodetects sizes, autoprobed # flash configuration ... autodetects sizes, autoprobed
flash bank $_CHIPNAME.flash stellaris 0 0 0 0 $_TARGETNAME flash bank $_CHIPNAME.flash stellaris 0 0 0 0 $_TARGETNAME

View File

@ -21,7 +21,7 @@ if { [info exists WORKAREASIZE] } {
} }
# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz # JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz
jtag_khz 1000 adapter_khz 1000
jtag_nsrst_delay 100 jtag_nsrst_delay 100
jtag_ntrst_delay 100 jtag_ntrst_delay 100

View File

@ -1,5 +1,5 @@
#start slow, speed up after reset #start slow, speed up after reset
jtag_khz 10 adapter_khz 10
if { [info exists CHIPNAME] } { if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME set _CHIPNAME $CHIPNAME
@ -29,9 +29,9 @@ jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_C
set _TARGETNAME $_CHIPNAME.cpu set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi
$_TARGETNAME configure -event reset-start { jtag_khz 10 } $_TARGETNAME configure -event reset-start { adapter_khz 10 }
$_TARGETNAME configure -event reset-init { $_TARGETNAME configure -event reset-init {
jtag_khz 6000 adapter_khz 6000
# Because the hardware cannot be interrogated for the protection state # Because the hardware cannot be interrogated for the protection state
# of sectors, initialize all the sectors to be unprotected. The initial # of sectors, initialize all the sectors to be unprotected. The initial

View File

@ -1,6 +1,6 @@
#STR730 CPU #STR730 CPU
jtag_khz 3000 adapter_khz 3000
if { [info exists CHIPNAME] } { if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME set _CHIPNAME $CHIPNAME
@ -33,9 +33,9 @@ jtag_ntrst_delay 500
set _TARGETNAME $_CHIPNAME.cpu set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian little -chain-position 0 -variant arm7tdmi target create $_TARGETNAME arm7tdmi -endian little -chain-position 0 -variant arm7tdmi
$_TARGETNAME configure -event reset-start { jtag_khz 10 } $_TARGETNAME configure -event reset-start { adapter_khz 10 }
$_TARGETNAME configure -event reset-init { $_TARGETNAME configure -event reset-init {
jtag_khz 3000 adapter_khz 3000
# Because the hardware cannot be interrogated for the protection state # Because the hardware cannot be interrogated for the protection state
# of sectors, initialize all the sectors to be unprotected. The initial # of sectors, initialize all the sectors to be unprotected. The initial

View File

@ -19,7 +19,7 @@ if { [info exists CPUTAPID] } {
} }
# jtag speed # jtag speed
jtag_khz 10 adapter_khz 10
#use combined on interfaces or targets that can't set TRST/SRST separately #use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst reset_config trst_and_srst srst_pulls_trst
@ -35,9 +35,9 @@ jtag_ntrst_delay 500
set _TARGETNAME $_CHIPNAME.cpu set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian little -chain-position 0 -variant arm7tdmi target create $_TARGETNAME arm7tdmi -endian little -chain-position 0 -variant arm7tdmi
$_TARGETNAME configure -event reset-start { jtag_khz 10 } $_TARGETNAME configure -event reset-start { adapter_khz 10 }
$_TARGETNAME configure -event reset-init { $_TARGETNAME configure -event reset-init {
jtag_khz 3000 adapter_khz 3000
# Because the hardware cannot be interrogated for the protection state # Because the hardware cannot be interrogated for the protection state
# of sectors, initialize all the sectors to be unprotected. The initial # of sectors, initialize all the sectors to be unprotected. The initial

View File

@ -26,12 +26,12 @@ reset_config trst_and_srst separate
# issue telnet: reset init # issue telnet: reset init
# issue gdb: monitor reset init # issue gdb: monitor reset init
$_TARGETNAME configure -event reset-init { $_TARGETNAME configure -event reset-init {
jtag_khz 100 adapter_khz 100
# this will setup Telo board # this will setup Telo board
setupTelo setupTelo
#turn up the JTAG speed #turn up the JTAG speed
jtag_khz 3000 adapter_khz 3000
puts "JTAG speek now 3MHz" puts "JTAG speed now 3MHz"
puts "type helpC100 to get help on C100" puts "type helpC100 to get help on C100"
} }