#include <msp430.h>
int main(void)
{
volatile unsigned int i; // Use volatile to prevent removal
// by compiler optimization
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
FLL_CTL0 |= XCAP11PF; // Configure load caps
for (i = 0; i < 10000; i++); // Delay for 32 kHz crystal to
// stabilize
do
{
IFG1 &= ~OFIFG; // Clear osc fault flag
for (i = 0; i < 1000; i++); // Delay for osc to stabilize
} while(IFG1 & OFIFG); // Check to see if osc flag is set
P1DIR = BIT1+BIT6; // Set P1.6,1 as outputs
P1SEL = BIT1+BIT6; // Select P1.6,1 as clk option
while(1); // Loop in place
}
#include <msp430.h>
int main(void)
{
volatile unsigned int i; // Use volatile to prevent removal
// by compiler optimization
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
FLL_CTL0 |= XCAP11PF; // Configure load caps
for (i = 0; i < 10000; i++); // Delay for 32 kHz crystal to
// stabilize
do
{
IFG1 &= ~OFIFG; // Clear osc fault flag
for (i = 0; i < 1000; i++); // Delay for osc to stabilize
} while(IFG1 & OFIFG); // Check to see if osc flag is set
P1DIR = BIT1+BIT6; // Set P1.6,1 as outputs
P1SEL = BIT1+BIT6; // Select P1.6,1 as clk option
while(1); // Loop in place
}
请问我用外部32K的晶体,MCLK最高可以输出多少的频率?
看你的倍频了,F4可以倍频,应该不超过25M吧,你看下,我刚好下班了
一周热门 更多>