On Thursday 25 March 2010, Laurent Gauch wrote:
> Again, having adapter_khz in the target scripts is really confusing.
.... SO DON'T DO THAT!!
As repeated elsewhere ... i's board-specific, so it normally doesn't
belong there. When it's in the board config files, no confusion.
If you persist in *DOING THE WRONG THING* you will stay confused,
and things won't work right for you
There are some rare exceptions, related to hardware limitations on the
order of "chip *must* boot with oscillator of frequency <X, Y, or Z>
In those cases the reset-start event handlers in target files should be
used to set a floor on the clock rate. example (from a JTAG-only target):
# be absolutely certain the JTAG clock will work with the worst-case
# CLKIN = 24 MHz (best case: 36 MHz) even when no bootloader turns
# on the PLL and starts using it. OK to speed up after clock setup.
jtag_rclk 1500
$_TARGETNAME configure -event "reset-start" { jtag_rclk 1500 }
That "after clock setup" might be in a board's "reset-init" handler.
That's where you might set up e.g. a 30 MHz JTAG clock, once it's
known that the chip is ready for such a rate.
Thre could also be target-specific conventions about how boards pass
clock rates down to target config files.
But the basic rule remains: things that vary between boards should
never be constants in target config files.
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development