23 unsigned int uiXT1Timeout = 50000;
24 unsigned int uiXT2Timeout = 50000;
26 while (BAKCTL & LOCKBAK) BAKCTL &= ~LOCKBAK;
29 UCSCTL6 |= XT1DRIVE1 + XT1DRIVE0;
32 UCSCTL6 &= ~(XCAP1 + XCAP0);
34 __delay_cycles(50000);
38 UCSCTL7 &= ~XT1LFOFFG;
40 }
while ((UCSCTL7 & XT1LFOFFG) && --uiXT1Timeout);
49 __delay_cycles(50000);
55 }
while ((UCSCTL7 & XT2OFFG) && --uiXT2Timeout);
58 UCSCTL4 |= SELA_0 + SELS_5 + SELM_5;