Hi Freddie,
On 12/03/2010 08:09 PM, Freddie Chopin wrote:
First of all, the chip frequency after reset actually is 4MHz due to
internal RC oscillator, so this "default frequency" assumption seems
pretty correct (actually it was probably me who added that script to
OpenOCD).
Incorrect. Yes, the chip starts from its 4 MHz oscillator, but what the
clock frequency actually is by the time OpenOCD gets access is
unpredictable.
If for instance the flash is empty, the device will enter ISP mode
automatically. It will activate the PLL, and from then on run with
14.748 MHz. When in this situation you program the flash with the clock
parameter set to 4 MHz, the programming pulse will have a width of less
than 30% of the required time. Might work, usually will, but is unreliable.
The clock parameter is vital for correct and reliable flash programming.
It must be possible for the user to select the frequency that he is using.
Debugging is negligibly faster when using high clock, flash
programming duration gain is probably also negligible (what's the
difference between waiting for 20 seconds to waiting for 10 seconds?).
10 seconds? 100% (as seen by the the lucky 10s user)? And by the way
this is unrealistic. The penalty is much higher!
At 72 MHz I can program the LPC2478 (504 KiB) in 14s with a simple JTAG
interface. I feel no urge to wait longer than that.
Anyway - I never enable PLL before flash programming, I bet that most
"regular users" also don't.
A classical chicken and egg case. We don't have good board scripts
especially for the LPC devices. That's why people don't use it.
But most of all - this makes running OpenOCD with just command line
arguments impossible (openocd -f interface/sth.cfg -f
target/sth_else.cfg), as now you have to have your board config file.
Please - don't go this way.
Why would that be impossible? Who prevents you to use a script that sets
*your* clock frequency and includes the target script?
Regards,
Rolf
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development