David Brownell wrote:
On Thursday 25 March 2010, Laurent Gauch wrote:
... OK, but we do not resolve the problem by DON'T DO THAT!!
Actually there are a lot of target scripts working with JTAGkey but not
with JTAGkey-2,
Specifically which ones?
Amontec customers feedback this troubles on
target/pxa270.cfg
target/pxa255.cfg
target/sam7se512.cfg
target/netx500.cfg
target/samsung_s3c2440.cfg
...
Exhaustive list ? I do not know ...
just because the JTAGkey-2 run by default at his highest
30Mhz frequency and because the target does not accept so high JTAG
Giving another example of "DON'T DO THAT!!!" ... just make your
jtagkey2 driver use the same default speed as the original model,
without needless incompatibilities.
Yes, this is a workaround but not a solution. You will get the same
trouble with other JTAG Dongles allowing a high JTAG frequency as <16Mhz ...
Example : the STM32 specify a 10MHz in the STM32 BSDL file .
%%%%%%%%Example%%%%%%%%%%%%
-- This section specifies the TAP ports. For the TAP TCK port, the
parameters in the brackets are:
-- First Field : Maximum TCK frequency.
-- Second Field: Allowable states TCK may be stopped in.
attribute TAP_SCAN_CLOCK of JTCK : signal is (10.0e6, BOTH);
attribute TAP_SCAN_IN of JTDI : signal is true;
attribute TAP_SCAN_MODE of JTMS : signal is true;
attribute TAP_SCAN_OUT of JTDO : signal is true;
attribute TAP_SCAN_RESET of JTRST : signal is true;
%%%%%%%%End Of Example%%%%%%%%%
When using JTAGkey-2 (max 30MHz), why should we force the user to use
6MHz (JTAGkey) instead of 10MHz (max of the STM32 specification).
This will be the same for a Xilinx or Altera target where the actual
JTAG frequency can up to 50 to 60 Mhz !
Again, this is not a trouble coming from JTAGkey or JTAGkey-2. This is a
trouble coming from openocd allowing to set a JTAG speed to high for a
given target !
If we do not provide a robust fix to this problem, the users will again
write their own custom .cfg, on their disk and the openocd community
will never get back any new WORKING .cfg !
Any way, we have to set the set the absolute JTAG frequency of the target.
As it is done in the BSDL FILE specification.
-----------------------------------
T H E S O L U T I O N
-----------------------------------
The solution is to add the absolute max frequency for a given device
when we create a "jtag newtap" as
jtag newtap $_CHIPNAME cpu .-freqmax_khz 10000 -irlen 7 -ircapture 0x1
-irmask 0x7f -expected-id $_CPUTAPID -expected-id $_CPUTAPID2
This will be the smarter solution I think adding to jtag newtap
-freqmax_khz xxxxxx
If -freqmax_khz not present (as now) let openocd to use the max
frequency of the Dongle (as 30MHz for the Amontec JTAGkey-2)
What do you think. I hope this is the way to go, and we keep the
adapter_khz as it is now, to control 'temporary' the JTAG frequency
(e.g. startup JTAG frequency ...)
Laurent
http://www.amontec.com
The config scripts might still be rather dubious... you would still
appear to have board configs relying on random driver state instead
of explicitly setting the right clock rate.
But they'd work as well as "before" (switching to jtagkey-2). Yes?
All is great with both Amontec JTAGkey and Amontec JTAGkey-2 (the
JTAGkey-3 is really promizing too), they works very well with OpenOCD .
That's nice.
The users can switch from one to an other, without any difficulty.
But the notion of frequency in the actual openocd do not let take all
advantages of the speed of the Amontec JTAGkey-2 :-)
Laurent
http://www.amontec.com
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development