This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP-TS430DA38: MSP430F2252

Part Number: MSP-TS430DA38

Tool/software: Code Composer Studio

hi'

   i have working this board ..my problem is 

if (CALBC1_16MHZ==0xFF) // If calibration constant erased
{
while(1); // do not load, trap CPU!!
}

problem 

1) CALBC1_16MHZ what is the use of this?i need answer.. 

2) 0xFF why here compare it? here said constant erased how it is possible here using == assignment oprator

pls reply

thanking you

siru

  • Hi Siru,

    Guessing you are using code something like below:

      if (CALBC1_16MHZ==0xFF)					// If calibration constant erased
      {											
        while(1);                               // do not load, trap CPU!!	
      }
      DCOCTL = 0;                               // Select lowest DCOx and MODx settings
      BCSCTL1 = CALBC1_16MHZ;                    // Set DCO to 16MHz
      DCOCTL = CALDCO_16MHZ;

    You can find the meaning of CALBC1_16MHz in the MSP430x2xx family devices User's Guide:

    This address in TLV area stores the factory calibration values for DCO running at 1MHz/8MHz/12MHz/16MHz. These values may vary among different devices, and always are not 0xFF. 

    Answering your question:

    1) CALBC1_16MHz is stand for the address of 0x10F8, which stores the factory calibration value for DCO running at 16MHz.

    2) Since this value is always not 0xFF, here comparing this with 0xFF is to check if the devices you are using is calibrated or not. As this value is stored in FLASH, it has the odds -- though very low -- that this content is erased by accident.

    Let me know if this helps.

    Regards,

    Harry

**Attention** This is a public forum