Hi, 
First post, so apologies if I'm not following correct procedure. Just to report 
that measure_clk is broken for FT2232 interface (and maybe others), I guess due 
to the runtest 10000000 at the heart of it overflowing the jtag command queue 
(runtest 10000000 on its own fails in the same way). 

Also the calculation in measure clock appears to calculate MHz, but reports the 
result in kHz.

OpenOCD log output:

Open On-Chip Debugger 0.6.0-dev-00077-g1411ad1 (2011-09-14-18:02)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
250 kHz
none separate
read_tapid
Error: unable to get latency timer: OK
Error: ftd2xx 1.04 detected - this has known issues with FT_GetLatencyTimer, 
upgrade to a newer version
Info : device: 4 "2232C"
Info : deviceID: 364511236
Info : SerialNumber: p2x
Info : Description: Olimex OpenOCD JTAG TINY A
Info : clock speed 250 kHz
Info : JTAG tap: u931.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 
0xf0f0, ver: 0x3)
Info : Embedded ICE version 1
Info : u931.cpu: hardware has 2 breakpoint/watchpoint units
Info : accepting 'telnet' connection from 4444
openocd: ft2232.c:404: buffer_write: Assertion `(unsigned) ft2232_buffer_size < 
(unsigned) 131072' failed.
Abort

I have worked around the measure_clk (In src/startup.tcl) issue by re-writing 
it to loop through several iterations of runtest with a smaller argument:

proc measure_clk {} {
        set start_time [ms];
        echo "Timing 10M TCKs ... "
        for { set i 0 } { $i < 100 } { set i [expr $i+1] } {
        runtest 100000;         
    }
    set time_taken [expr [ms]-$start_time];
        echo "$time_taken ms : TCK Running at more than [expr 10000.0 / 
([ms]-$start_time)] MHz";
}

This of course leaves the issue with huge arguments to runtest

Kind Regards 
Julien
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to