Tom Paden

AW60 Clock settings

Discussion created by Tom Paden on Jun 4, 2007
Latest reply on Jun 6, 2007 by Tom Paden
I'm experiencing rather a strange thing with setting a clock on my AW60 system. I have a 10Mhz external crystal and I'm trying to set the system clock at 40Mhz but what ever values I specify for MFD (multiplier) or RFD (divider), I have the clock operating at 4Mhz I confirmed this with a serial communication to a PC and clock output pin.
Here's my code:

void initClock(void){
   ICGC2_MFD = 0b000; // clock multiplier = 4
   ICGC2_RFD = 0b000; // clock divider = 1;
   ICGC1 = 0b11111000; // configured for
   //                 1 ----------- // High gain operation
   //                    1 ---------- // high frequency range
   //                      1--------  // oscillator using crystal or resonator requested
    //                       11 ----- // FLL engaged, external reference
    //                          0--- // enabled in off mode
    //                             0 -- // loss of clock detection enabled
   //                                0 - // not writable

while ((ICGS1_LOCK==0)||(ICGS1_ERCS==0)){
  _RESET_WATCHDOG();
}
ICGC2_LOCRE = 1; // enable reset if clock fails
ICGC2_LOLRE = 0;  // enable interrupt if lock fails

Thanks for your support guys!

I just removed the crystal off the board, the clock still operates at 4Mhz!


Message Edited by Andrey on 2007-06-04 02:36 PM

Outcomes