AnsweredAssumed Answered

Help needed regarding CPU clock

Question asked by Gursimran singh Mohar on Sep 5, 2010
Latest reply on Mar 19, 2011 by Neil Nowotarski

Hi there

My question is that how can I know that at what frequency my CPU is running and if I'm using external or internal clock ..

Actually I'm not sure if my circuit contains clock because i don't know how it looks as the components are SMD of which I'm unfamiliar.


My basic problem is that I want to write and then read data from EEPROM, I'm using EEPROM bean of processor expert. I can get ERR_OK both from SetByte and GetByte but the value returned is always 255 while i'm passing it 1..

You can look at the code below

void main(void){unsigned char simar = 1;unsigned char return_val; unsigned char* read_data;//volatile unsigned int* address;//  address=(volatile unsigned int*)0x13f000;IEE1_TAddress address;IEE1_TAddress address1,address2,address3;//1306624 - 1310715//address=(IEE1_TAddress)0X13F020;address1=(IEE1_TAddress)0X13F000;address2=(IEE1_TAddress)0X13F000;address3=(IEE1_TAddress)0X13F000;  //unsigned long address   =1310715UL;  /* Write your local variable definition here */  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/  PE_low_level_init();  /*** End of Processor Expert internal initialization.                    ***/  DDRT=0xF0;                // Setting Port T pin 4,5,6,7 as output  return_val = IEE1_EraseEeprom(address1); if(return_val == ERR_OK)  {           LED3=LED_OFF;  }  return_val = IEE1_SetByte(address2,simar);   if(return_val == ERR_OK)  {           LED1=LED_OFF;           return_val=IEE1_GetByte(address3,read_data);                      if(return_val == ERR_OK)           {                    if(*read_data == 1)                    {                              LED2=LED_OFF ;                     }           }  }   //IEE1_TAddress Addr,word Data);  /* Write your code here */  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/  for(;;){}  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/


I need to use EEPROM urgently, so please help me.

Also I think there should be some idea to get the clock speed from the debugger.

I'm using code warrior and my processor is mc9s12xd256


Thanks in advance