David Brownell wrote on 2009-08-30 22:05:18:

> On Sunday 30 August 2009, Dirk Behme wrote:
> > David Brownell wrote:
> > > On Sunday 30 August 2009, Dirk Behme wrote:
> > >> --- trunk_r2643.orig/tcl/interface/flyswatter.cfg
> > >> +++ trunk_r2643/tcl/interface/flyswatter.cfg
> > >> @@ -8,5 +8,5 @@ interface ft2232
> > >>  ft2232_device_desc "Flyswatter"
> > >>  ft2232_layout "flyswatter"
> > >>  ft2232_vid_pid 0x0403 0x6010
> > >> -jtag_speed 1
> > >> +jtag_khz 3000
> > > 
> > > Such things belong in board config files;
> > > there's no reason a flyswatter wouldn't
> > > be used with some board with a different
> > > default speed.
> > 
> > Isn't the opposite true as well? Each board config could be used with 
> > an other interface, possibly resulting in different jtag clock?
> 
> Yes; sorry, I meant "user config file" as in "openocd.cfg".

I think than the board config file is the right place to put speed
settings. It will benefit the end users if we provide good clock speed
settings in the scripts that is shipped with OpenOCD.

The maximum JTAG clock speed is mostly dependent of board specific
things. Some examples:
* The devices in the JTAG chain of the board.
* The CPU clock source/speed.
* Different source/speed before and after reset init. Some board
  files have scripts that change the clock source/speed at specific
  events.
* The routing of the JTAG wires.
* Board support of RTCK.

The interface driver should only set the speed to the requested or the
closest lower supported speed. I do not think there is any problem
running with a lower speed than the requested.

The type and length of the cable that connects the interface to the
board and also the interface driver strength have some influence.
I think it is minor, but it is possible that we should be a bit
conservative when we select the clock speed for the board scripts.

If the board support RTCK (its MCU support it and it is routed to
the JTAG connector, please consider to use the jtag_rclk instead of
jtag_khz. It will fall back to a fixed clock speed if the interface
do not support RTCK.

Best regards
Jonas Hörberg

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to