Other Parts Discussed in Thread: MSP430F249
Hello,
I'm using a MSP430F249 with a 16MHz quartz on XT2.
For test Im running this sample program :
#include "msp430x24x.h"
volatile unsigned int i;
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P5DIR |= 0x10; // P5.4= output direction
P5SEL |= 0x10; // P5.4= MCLK option select
P3DIR |= BIT2; // P3.2 = output direction
BCSCTL1 &= ~XT2OFF;
BCSCTL3 |= XT2S_2; // Select 3-16MHz crystal range
// Starts at 1MHz with internal oscillator
// Wait 50 ms the external oscillator start
// 1 us by tick
while (i < 50000)
{
__no_operation();
i++;
}
// Then configure to external
BCSCTL2 |= SELS + SELM_2; // Select XT2CLK
for (;;) // Infinite loop
{
P3OUT |= BIT2; // P3.2 = 1
P3OUT &= ~BIT2; // P3.2 = 0
P3OUT |= BIT2; // P3.2 = 1
P3OUT &= ~BIT2; // P3.2 = 0
P3OUT |= BIT2; // P3.2 = 1
P3OUT &= ~BIT2; // P3.2 = 0
}
Ive 3.6µs between each edges. This seems to me slow ...
What do you think ?