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.

ESR Value for MSP430F5418A

Other Parts Discussed in Thread: MSP430F5418A, MSP430F5418

Hello Everyone,

I am debugging set of sensor boards controlled by the MSP430F5418A.  I have encountered an interesting issue.  In about 10% of the boards, the external oscillator will not engage.  This makes the microcontroller unable to communicate with other systems.  I looked at the ESR value of the crystal oscillator used in the system, and it is listed as 35kohms.  This seems extremely low to me.  I attempted to find a recommended value in the microcontroller's datasheet, but was unable to locate a value for it.  Can someone list a recommended ESR value for use with a MSP430F5418A?  Thank you.

--Timothy Struble-Larsen

  • Hi,

    did you set the correct drive strength in UCSCTL6 according to the crystal's frequency?

    Dennis
  • Dennis,

    Thank you for your response.  I am looking at the UCSCLT6 register and it appears to only have references for crystals operating in the megahertz range.  This projects uses a 32kHz oscillator.  Am I not understanding the register values correctly?

    --Timothy

  • Hello,

    You may also find the following application note of some use.

    www.ti.com/lit/slaa322
    MSP430 32-kHz Crystal Oscillators

    Regards,
    JH
  • Jace,

    I found this document previously. It does not cover the MSP430F518 series. Is their a second document which has this information?

    --Timothy
  • Timothy,

    This document applies to all MSP430 Families and is a general tool for getting 32-kHz oscillators to work consistently with our devices.

    regards,
    JH
  • You are right, the settings in UCSCTL6 are for HF crystals, not for the 32k768 one. You did not say which one you are talking about, so I guessed and was wrong :) Happens... Do you have additional load capacitance attached to your crystal?
  • Dennis,

    I do not have any external capacitors attached to the oscillator.  However, I set the internal capacitance to the default value, 12pf.  I tried each of the values available, and none had any effect.  I have also adjust power to the xt1 pin and switched the crystal oscillator. 

    --Timothy

  • Timothy,

    What is the effective load capacitance value for your xtal? Can you link to its datasheet?

    regards,
    JH
  • Timothy,

    What is your xtal full part number? By having this, we can determine the xtal's exact specs.

    Regards,
    JH
  • JH,

    The following is the exact part number:

    EPSON #MC-306 32.7680K-E3

    Thank you,

    Timothy
  • Timothy,

    Your crystal has an Effective Load Capacitance of 6pF. The integrated capacitance is Effective Load capacitance, not straight Capacitance. This means you will need to set the XCAPx register =1 ( 6pF Effective Load Capacitance). Please also keep in mind for this xtal, set XT1DRIVEx =1 as well.

    Regards,
    JH
  • JH,

    Thank you for the correct values.  In order to see if the board can function using the settings you provided, I attempted to make a simple pin high/pin low program.  For some reason, I seem to be unable to modify the registers on the micro-controller.  My sample code is given below.  Is my methodology for setting and clearing register bits incompatible with the msp430 series?  Thank you.

    --Timothy Struble-Larsen

    #include <msp430f5418.h> // header file that depends upon your variant

    #define BV(bit) (1 << bit)

    #define setBit(word,bit) (word |= BV(bit))

    #define clearBit(word,bit) (word &=~BV(bit))

    #define toggleBit(word,bit) (word ^=BV(bit))

    /*

    * main.c

    */

    int main(void) {

    setBit(UCSCTL6,6);

    clearBit(UCSCTL6,7);

    //UCSCTL6=UCSCTL6 & ~(0x40);

    //UCSCTL6=UCSCTL6 & ~(0x80);

     

    clearBit(UCSCTL6,3);

    setBit(UCSCTL6,2);

    //UCSCTL6=UCSCTL6 |0x04;

    //UCSCTL6=UCSCTL6 |0x40;

    WDTCTL = WDTPW | WDTHOLD;// Stop watchdog timer

    P1DIR = 0X41; //Declare PIN0 AND PIN1 OF PORT 1 AS OUTPUT

    P1OUT = 0X01; //MAKE PIN0 HIGH AND PIN1 LOW INITIALLY

    unsigned int i; //Delay variable

    while(1)

    {

    toggleBit(P1OUT,0);

    //P1OUT ^=0X41; //Toggle the respective by using bit-xor operator

     

    for(i=0;i<100;i++){ //Necessary delay, change it to see the effect on toggling

    }

    }

    return 0;

    }

  • alright, I figured out that I need to use "BIT4" instead of "1<<4." Now I can write to the registers. However, I still cannot get a sinewave out of any of the oscillators. Here is my new code:

    #include <msp430f5418.h> // header file that depends upon your variant

    #define BV(bit) (1 << bit)
    #define setBit(word,bit) (word |= bit)
    #define clearBit(word,bit) (word &= ~bit)
    #define toggleBit(word,bit) (word ^= bit)
    /*
    * main.c
    */
    int main(void) {

    setBit(UCSCTL6,BIT6);
    clearBit(UCSCTL6,BIT7);
    //UCSCTL6=UCSCTL6 & ~(0x40);
    //UCSCTL6=UCSCTL6 & ~(0x80);


    clearBit(UCSCTL6,BIT3);
    setBit(UCSCTL6,BIT2);

    //UCSCTL6=UCSCTL6 |0x04;
    //UCSCTL6=UCSCTL6 |0x40;
    WDTCTL = WDTPW | WDTHOLD;// Stop watchdog timer

    P1DIR = 0X41; //Declare PIN0 AND PIN1 OF PORT 1 AS OUTPUT

    P1OUT = 0X01; //MAKE PIN0 HIGH AND PIN1 LOW INITIALLY

    unsigned int i; //Delay variable
    while(1)
    {
    toggleBit(P1OUT,BIT0);

    }

    return 0;
  • I figured out that I need to use "BIT4" instead of "1<<4."

    BIT4 means 0001 0000 in binary

    1<<4 means shifting 0000 0001 left by 4 which results in 0001 0000

    That means, both is the same.

    Dennis

**Attention** This is a public forum