> Most of the time - in the jtag dongle - RTCK is implemented via software
> polling, and it ends up being slower. Adding a "timeout" in software (ie: in
> case the cable is not connected, or target is powered off) makes the
> software poll loop even slower. But - the vendor will not state that, or
> their little gadget does not support RTCK and they must cover this little
> problem up.

Ah :-) I guess I don't have any suggestions currently on how, or if,
to handle this in OpenOCD.

Add a "Slow RCLK" flag?

Let such drivers implement additional commands to turn RCLK on/off?

Committed a comment about this in jtag.h for now.

> In contrast, a hardware based jtag (cpld, or fpga) could - theoretically run
> at lighting speed - and dynamically adjust to *ANY* target clock, and
> implement a small hardware timer to detect/error-on "stuck" signals.

We sample RCLK at 32MHz. I guess it is possible to implement RCLK in
an asynchronous fashion, but that might be a bit too clever with FPGA
implementation :-)

I've come to the conclusion that RCLK would be close in speed to maximum
performance achievable. This is what we've seen with STR912 and LPC2148.
The maximum speed for those two devices are 2-3MHz (without RCLK) and
with RCLK sampled at 32MHz we get something close to that.

> Just what is the correct TCK vrs CPU-CLK ratio? I believe a simple statement
> of: 1/8 the CPU clock frequency is correct for ARM parts.  yes, some parts,
> it could be faster. See below.
>
> My reasoning comes from these schematics supplied by arm detailing how to
> hook up the ARM core to the jtag pins.

My approach to this has been to try to see what works. The implementation
of the JTAG interface also matters. The ZY1000 works robustly with
AT91FR40162 @ 16MHz. That core runs @ 64MHz.

Index: C:/workspace/openocd/src/jtag/jtag.h
===================================================================
--- C:/workspace/openocd/src/jtag/jtag.h        (revision 968)
+++ C:/workspace/openocd/src/jtag/jtag.h        (working copy)
@@ -199,7 +199,13 @@
        int (*init)(void);
        int (*quit)(void);
        /* returns JTAG maxium speed for KHz. 0=RTCK. The function returns
-       a failure if it can't support the KHz/RTCK. */
+       a failure if it can't support the KHz/RTCK.
+       
+       WARNING!!!! if RTCK is *slow* then think carefully about
+       whether you actually want to support this in the driver.
+       Many target scripts are written to handle the absence of RTCK
+       and use a fallback kHz TCK.
+       */
        int (*khz)(int khz, int *jtag_speed);
        /* returns the KHz for the provided JTAG speed. 0=RTCK. The function 
returns
        a failure if it can't support the KHz/RTCK. */


-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to