Here's a much simpler bugfix for the "frequency" command resulting in
the wrong TCK frequency on my olimex ARM-USB-OCD-H cable.
what's happening in there:
ft2232_set_frequency() and ft2232h_set_frequency() both call
ft2232_set_frequency_common() with different values of the
max_frequency argument.
The call made when the frequency is changed after opening the cable
has to match up exactly with which set_frequency function
the the _init() routine has called at cable-initialization
time, otherwise the frequency divide calculation will end be wrong.
The much more complex patch done earlier moves all of the H vs. non-H
distinction into one place only, in the per-cable init functions.
While the orgiginal code requires dealing with H vs non-H in two
places. I think the big long thing ends up a little cleaner and reduces
the likelyhood of future coding errors.
Let me know what you think.
There's still a lot I don't understand about the various function
tables involved in finding cables and drivers. But I'm getting
closer, and might be able to write down some guidelines before too
long.
On Fri, 30 Jun 2017, Geert Stappers wrote:
On Fri, Jun 30, 2017 at 09:56:46AM -0400, Steve Tell wrote:
Hold off on applying this...
Okay
it works fine, but I'm not sure there isn't a much simpler bugfix
that would take care of the TCK issue on ARM-OCD-USB-H.
We shall see. Feel free to unblock the "hold off"
Groeten
Geert Stappers
--
Leven en laten leven
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development
From 73889353e00ad2effec8f7bc4d2ec7ffc45b707b Mon Sep 17 00:00:00 2001
From: Steve Tell <[email protected]>
Date: Fri, 30 Jun 2017 18:12:44 -0400
Subject: [PATCH] Fix for changing TCK frequency of ARM-USB-OCD-H
point to ft2232h_set_frequency() variant to avoid TCK
being 5x faster than the user's desired new frequency
---
urjtag/src/tap/cable/ft2232.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/urjtag/src/tap/cable/ft2232.c b/urjtag/src/tap/cable/ft2232.c
index 53e9445..72a96a1 100644
--- a/urjtag/src/tap/cable/ft2232.c
+++ b/urjtag/src/tap/cable/ft2232.c
@@ -2349,7 +2349,7 @@ const urj_cable_driver_t
urj_tap_cable_ft2232_armusbtiny_h_driver = {
ft2232_cable_free,
ft2232_armusbtiny_h_init,
ft2232_armusbocd_done,
- ft2232_set_frequency,
+ ft2232h_set_frequency,
ft2232_clock,
ft2232_get_tdo,
ft2232_transfer,
--
1.7.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development