diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-08-02 11:15:21 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-08-02 11:15:21 +0200 |
commit | ab818f68984aaf56f8b966f4b2e2da4e7f1051c9 (patch) | |
tree | ddf72cff506d1c7a347a9120ddd04bd46982d646 /src | |
parent | 803351ec59cb57c63129c77d95b5edf2fc65c302 (diff) | |
download | openocd_libswd-ab818f68984aaf56f8b966f4b2e2da4e7f1051c9.tar.gz openocd_libswd-ab818f68984aaf56f8b966f4b2e2da4e7f1051c9.tar.bz2 openocd_libswd-ab818f68984aaf56f8b966f4b2e2da4e7f1051c9.tar.xz openocd_libswd-ab818f68984aaf56f8b966f4b2e2da4e7f1051c9.zip |
jtag: measure_clk debug proc
It can be useful to get an approximate measurement of
rtck frequency for debugging purposes.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/startup.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl index 496fdc82..fdd30781 100644 --- a/src/jtag/startup.tcl +++ b/src/jtag/startup.tcl @@ -76,6 +76,15 @@ proc srst_asserted {} { puts "Sensed nSRST asserted." } +# measure actual JTAG clock +proc measure_clk {} { + set start_time [ms]; + runtest 10000000; + echo "Running at more than [expr 10000.0 / ([ms]-$start_time)] kHz"; +} + +add_help_text measure_clk "Runs a test to measure the JTAG clk. Useful with RCLK / RTCK." + # BEGIN MIGRATION AIDS ... these adapter operations originally had # JTAG-specific names despite the fact that the operations were not # specific to JTAG, or otherewise had troublesome/misleading names. |