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.

External XT1 clock doesnot seem to work

Other Parts Discussed in Thread: MSP430F1610

Hi,

I am trying to use XT1 clock in the following code snippet:

WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= 0xff;

BCSCTL1 = XT2OFF | XTS;
BCSCTL2 = SELM0 | SELM1;

volatile unsigned int j;

do {
IFG1 &= ~OFIFG;
for (j = 0xff; j>0; j--);
} while((IFG1&OFIFG) == OFIFG);

The problem is that when I comment the do while loop, the code works fine with DCO clock. But when the I uncomment the do while loop, the code doesnot work with the XT1 clock. I am using MSP430F1610 and supplying an external frequency of 4MHz. The output of the function generator is directly connected to XT1 pin of MSP430F1610. I am using the normal blinking LED example with this external clock.

Any help is most appreciated ! Thanks in advance !

**Attention** This is a public forum