On Wednesday 24 March 2010, Øyvind Harboe wrote: > Target scripts without a adapter_khz should be fixed to have one, > otherwise the khz is undefined.
Make that "board config scripts", as a rule. It's routine for different boards to use different crystals, even if they have the same chip/target ... and thus for speed settings in target config scripts to be wrong. This isn't straightforward. The right speed is often also a function of how firmware has initialized things and where it is in the init sequence, as well as board design variables. (The User's GUide *does* have information about this. IN several places. It's a bit more scattered than I'd prefer.) Consider the Atmel boards reset to a 32 KiHz "slow clock" and then later turn on the main oscillator (tens of MHz) and then a PLL (to run at maybe 200 MHz). Event handlers have to update the JTAG clock. (Not at all restricted to Atmel chips of course; those are notable mostly because the initial clock is unusually slow. And... because that initial clock is a chip characteristic, not specific to the board.) ... but it is virtually NEVER correct to have an adapter driver choose a clock rate. > If a card *could* support RCLK, then use jtag_rclk instead. It will > default to rclk if the adapter supports it, otherwise use the khz > specified by the script. ... only do that if the target/chip supports RCLK though. If it does, then using adaptive clocking probably means you won't need to have event handlers updating the JTAG clock rate. - Dave _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
