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.

MSP430FR2311: HF External Oscillator Set Up Help

Part Number: MSP430FR2311

Hello, I'm trying to set up my MSP430 to use an external 4MHz oscillator but it seems to be causing a fault, since the flag XT10FFG is set high on CSCTL7. Here is my set up code, can someone let me know what I'm doing wrong? The documentation isn't clear on the config order and such.

I have the oscillator feeding pin 2.7 on my device.

P2DIR = BIT4 | BIT6; //Set 4 out.
    P2SEL0 = BIT1;
    P2SEL1 = BIT6 | BIT7; //Set X1 mode on pins


    CSCTL1 = DCORSEL_5; //Set clock to 8MHz
    CSCTL4 = SELMS_2 | SELA__REFOCLK;
    CSCTL6 = XTS_1; //HF Mode crystal
    CSCTL7 &= ~XT1OFFG;

**Attention** This is a public forum