On Wednesday 23 September 2009, freddie_cho...@op.pl wrote: > "Petri Pirttinen" <petri.pirtti...@tietolaite.com> napisał(a): > > I may have missed something in here, but why trying to specify a crystal > > frequency? Can't we use 4 MHz in here, IF we are setting the clock > > source to internal RC oscillator in reset-init script anyway? > > 1. Not all LPCs have internal RC - just the "more recent ones" > from LPC23xx and LPC24xx family - older ones (LPC21xx and LPC22xx) > need a crystal to start and run.
And that hardware is not restricted to 12 MHz crystals... > 2. To clarify - 12MHz is the default value for the chips without > the RC. The ones that do have it have that frequency configured to 4MHz. I don't see how that can be right either, except on chips that have a real way to halt-on-reset ... and as I understand, these chips from NXP don't support that. So chip startup code will run, and likely set up some clocking stuff first thing, which will be neither 4 MHz nor 12 MHz but something appropriate to the board and the application int manages. > > And, Freddie, I hope you can bear with this conversation. I think that > > these things discussed in here does relate to each other, although some > > of them needs to be addressed separately really. In all and all I'm > > quite thrilled about this as finally I get some light shred to this > > LPC2xxx mess. Your proposed script layout is A LOT better than any I've > > seen so far. > > The things are related - true, but there is no problem in finishing with > one and starting another then, not to simultaneously think about 10 > different things. IMHO we'll never go anywhere while "jumping around" > like this. Agreed. But there's no "jumping around" here; just the normal sort of requirement that each incremental step be correct. > Anyway - to be honest - I don't know what should I / we do now. The > frequency IS required, it has to be specified some way or another. > Unfortunatelly I think only the method proposed in the file I posted > is user friendly - the need for next "wrapper script" that would specify > that just because "frequency is not specific to targets" seem extremely > "un-friendly" to me. A "wrapper" is already required to associate the right JTAG adapter with the right target. I fail to see how adding the "set" in this: source [interface/...cfg] set CRYSTAL_SPEED 3579545 source [target/...cfg] is "unfriendly" ... especially compared to setting the wrong value for the clock speed, so flash write timings are broken. - Dave _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development