用6736做了一块板子,在进行UCS的初始化时,运行初始化代码如下:
PJDIR |= BIT0 | BIT1 | BIT3; // ACLK, MCLK, SMCLK set out to pins PJSEL |= BIT0 | BIT1 | BIT3; // PJ.0,1,3 for debugging purposes.
UCSCTL6 &= ~(XT1OFF); // Enable XT1 UCSCTL6 |= XCAP_1; // Internal load cap // Loop until XT1, XT2 & DCO fault flag is cleared do { UCSCTL7 &= ~(XT2OFFG | XT1LFOFFG | DCOFFG); // Clear XT2,XT1,DCO fault flags SFRIFG1 &= ~OFIFG; // Clear fault flags //for(unsigned int i=0;i<50000;i++); } while (SFRIFG1 & OFIFG); // Test oscillator fault flag
|