Part Number: MSP430FR2153
Hi experts,
My customer is building a product using MSP430FR2153.
They are considering using XT1 in the following ways.
1. Activate the XT1 clock immediately after power-on (start oscillation)
2. Use REFO as the source of ACLK, MCLK, and SCLK until XT1 clock oscillation stabilizes.
3. When the outgoing XT1 clock is stable, switch the ACLK, MCLK, and SCLK sources to XT1.
Could you please tell me about the following question here.
Q1: Am I correct in understanding that XT1 can be enabled in Active Mode, LPM0~4 by clearing XT1AUTOOFF?
Q2: In other words, Am I correct in understanding that clearing XT1AUTOOFF will start XT1 oscillation even if it is not being used for any internal system function?
Q3: Is there a register to check whether XT1 is currently oscillating (in other words, active)?
Q4: If 1 is not set after clearing OFIFG (pass line 88 of the code below), does it mean that XT1 is definitely stable?
They have added a 1.5sec wait in the program to wait for XT1 to stabilize oscillation. The reason is that it takes 80ms to exit line 88 of the code below, whereas it takes about 1.2s for the oscilloscope to stabilize the oscillation.
#include <msp430.h>
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
CSCTL3 |= SELREF__REFOCLK; // Set REFO as FLL reference source
CSCTL4 |= SELA__REFOCLK; // Set ACLK = REFO = 32768Hz
CSCTL7 &= ~(XT1AUTOOFF); // Clear XT1 and DCO fault flag
P2SEL1 |= BIT6 | BIT7; // P2.6~P2.7: crystal pins
do
{
CSCTL7 &= ~(XT1OFFG | DCOFFG); // Clear XT1 and DCO fault flag
SFRIFG1 &= ~OFIFG;
} while (SFRIFG1 & OFIFG); // Test oscillator fault flag
// Port Configuration all un-used pins to output low
P1OUT = 0x00; P2OUT = 0x00;
P3OUT = 0x00; P4OUT = 0x00;
P5OUT = 0x00; P6OUT = 0x00;
P1DIR = 0xff; P2DIR = 0xff;
P3DIR = 0xff; P4DIR = 0xff;
P5DIR = 0xff; P6DIR = 0xff;
PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode
// to activate previously configured port settings
while(1)
{
// P1OUT ^= BIT0; // Toggle P1.2 using exclusive-OR
__delay_cycles(1000000); // Delay for 10000000*(1/MCLK)=1.25s
}
}
The basic software is complete and development is nearing its climax. I am sorry, but I would appreciate an answer by 11/15.
Best regards,
O.H


