Nick Jurich

Clock Trim Help?

Discussion created by Nick Jurich on Feb 15, 2011
Latest reply on Feb 16, 2011 by Nick Jurich



I'm trying to figure out how all of this clock trimming stuff works. I've read through a few threads and don't see the answer to my question, but if anyone knows where it is out there, please point me to it. I'm new at this.


I have two ColdFire MCF51QE64 chips that I'm playing with. I'm using the internal clock and need a fairly accurate 4MHz Bus Clock. Using PWM, I'm throw the Bus Clock divided by 1000 (MHz to KHz) out to a pin that I measure with a meter to determine the actual speed of the Bus Clock. With ColdFire chip 1, I've determined that ICSTRM needs to be 0xB7 to get a 4MHz Bus Clock. For ColdFire chip 2, ICSTRM needs to be 0xA1. If I understand how this is supposed to work, there is some non-volatile (NV) storage at address 0x3FF which is supposed to hold this chip specific value. Then, all I need to do is copy the value from that location into ICSTRM and I get my nice 4MHz Clock. I don't understand how I'm supposed to program 0xA1 and 0xB7 into address 0x3FF of the respective chips so that it can be used at runtime. (For simplicity in describing my situation, I've omitted the fact that there's also 1 bit at ICSSC_FTRIM which has an accompanying NV bit at address 0x0x3FE).


Are the tools supposed to program these NV addresses for me? If so, how do they know what value to put in or do I enter the value? This seems like a very handy mechanism but I feel like I'm missing some key piece of information which brings it all together. Any help would be appreciated.