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.

MSP430g2553 clock calibrations

Other Parts Discussed in Thread: MSP430G2553

Hi everyone;

Lately I've developed a need to increase the clock speed of my msp430g2553.  I have been using the following code to run the clock at 1MHz.  

void ConfigClocks(){	

BCSCTL1 =CALBC1_1MHZ; //set range
DCOCTL = CALDCO_1MHZ; //set DCO step+ modulation
BCSCTL3 |= LFXT1S_2; //LFXT1 = VLO
IFG1 &= ~OFIFG; //clear OSCFault flag
BCSCTL2 |= SELM_0 +DIVM_3 +DIVS_3; //MCLK = DCO/8, SMCLK = DCO/8

}

In order to increase the clock speed I adjusted all of the clock speeds from 1MHz to 8 MHz which resulted in the following final draft of code

void ConfigClocks(){	

BCSCTL1 =CALBC1_8MHZ; //set range
DCOCTL = CALDCO_8MHZ; //set DCO step+ modulation
BCSCTL3 |= LFXT1S_2; //LFXT1 = VLO
IFG1 &= ~OFIFG; //clear OSCFault flag
BCSCTL2 |= SELM_0 +DIVM_3 +DIVS_3; //MCLK = DCO/8, SMCLK = DCO/8

}

I looked in the header file "msp430g2553.h" and found that there are definitions for CALBC1_8MHz and CALDCO_8MHz, but I keep getting the following errors,

unresolved symbol CALBC1_8MHZ, first referenced in ./blinker.obj
and
unresolved symbol CALDCO_8MHZ, first referenced in ./blinker.obj

can anyone tell me why these symbols are still unresolved even though they are defined in the header file
"msp430g2553.h"?

Thanks:
Greg
  • I can only guess.

    May be the header file you looked at is not the same header file the compiler looked.

    May be there are typos that look-a-like but do not actually match.

    May be the compiler is crazy.

    Tools are suppose to make tool-users' life easier. But ....

  • Hi Greg,

    The Gxx1 devices only have a definition for 1Mhz and not for 8Mhz, but the G2xx3/G2xx2 should have both (and some others).

    Are you using CCS or IAR?

    If CCS, then this could be a problem with the .cmd file. Are you using the right .cmd for the G2553?

    Your project should include a lnk_msp430g2553.cmd which includes this at the bottom:

    -l msp430g2553.cmd

    This other file (msp430g2553.cmd) has the definition of the registers:

    /************************************************************
    * Calibration Data in Info Mem
    ************************************************************/
    CALDCO_16MHZ       = 0x10F8;
    CALBC1_16MHZ       = 0x10F9;
    CALDCO_12MHZ       = 0x10FA;
    CALBC1_12MHZ       = 0x10FB;
    CALDCO_8MHZ        = 0x10FC;
    CALBC1_8MHZ        = 0x10FD;
    CALDCO_1MHZ        = 0x10FE;
    CALBC1_1MHZ        = 0x10FF;

    Can you verify if this file is correct?

    Regards,

    Luis

  • Thanks for the Help guys but I figured it out.  I just had an issue with  my .cmd file.  I appreciate the advice though.  

    Best Regards;

    Greg

**Attention** This is a public forum