On Sun, Oct 9, 2011 at 12:37 PM, Simon Barner <bar...@gmx.de> wrote: > Dear list, > > I have already posted the attached script some weeks ago. > > It enables the PLL of the STM32F107 and thus configures > the MCU to run at 72 MHz which allows for higher JTAG speeds. > > Since this should be useful for everybody, I would like to > contribute it to OpenOCD. However, I am not sure how to integrate > it. One idea is to conditionally call it from scripts/target > /stm32f1x.cfg. Comments and alternative suggestions are highly > appreciated. >
First of all, it's better to run off of the HSI instead. Not everyone has a crystal attached, or it could be another frequency. For example, I have this in my config files (for STM32F103, I don't know what differs): $_TARGETNAME configure -event reset-init { mww 0x40022000 0x32 mww 0x40021004 0x3c0400 mww 0x40021000 0x01000883 sleep 10 mww 0x40021004 0x3c0402 sleep 10 adapter_khz 3000 } As Michael said, it's probably best to put in in a tcl procedure that the user can choose to call from the reset-init hook. Don't put the adapter_khz in that procedure. If the settings are the same for all devices in the family, the procedure probably belongs in target/stm32f1x.cfg. /Andreas
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development