你好,
这是一个客户的问题。
现象:MCU采用外部硬件看门狗电路,硬件看门狗电路输出正常的复位信号(通过示波器测量复位信号的高低电平均正常)。该复位信号输入到MSP430芯片后,MSP430晶振无法正常起振。(用示波器测量晶振信号为直流电平。无源晶振不起振现象为偶发现象,并非每块板卡都会,概率:几十次出现一次)。测量MCU电源未发现异常,查看晶振PCB走线,走线很短,阻抗50Ω,包地良好,且无源晶振附近无其他信号线。
可以帮忙看一下吗?
谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
你好,
这是一个客户的问题。
现象:MCU采用外部硬件看门狗电路,硬件看门狗电路输出正常的复位信号(通过示波器测量复位信号的高低电平均正常)。该复位信号输入到MSP430芯片后,MSP430晶振无法正常起振。(用示波器测量晶振信号为直流电平。无源晶振不起振现象为偶发现象,并非每块板卡都会,概率:几十次出现一次)。测量MCU电源未发现异常,查看晶振PCB走线,走线很短,阻抗50Ω,包地良好,且无源晶振附近无其他信号线。
可以帮忙看一下吗?
谢谢!
另外代码内XTS要重新配置成1来使能XT1的高频功能。
/* --COPYRIGHT--,BSD_EX * Copyright (c) 2012, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ******************************************************************************* * * MSP430 CODE EXAMPLE DISCLAIMER * * MSP430 code examples are self-contained low-level programs that typically * demonstrate a single peripheral function or device feature in a highly * concise manner. For this the code may rely on the device's power-on default * register values and settings such as the clock configuration and care must * be taken when combining code from several examples to avoid potential side * effects. Also see www.ti.com/grace for a GUI- and www.ti.com/msp430ware * for an API functional library-approach to peripheral configuration. * * --/COPYRIGHT--*/ //****************************************************************************** // MSP-FET430P140 Demo - Basic Clock, MCLK Sourced from HF XTAL // // Description: Proper selection of an external HF XTAL for MCLK is shown by // first polling the OSC fault until XTAL is stable - only then is MCLK // sourced by LFXT1. MCLK is on P5.4 // ACLK= MCLK= LFXT1= HF XTAL // //* HF XTAL NOT INSTALLED ON FET *// // //* Min Vcc required varies with MCLK frequency - refer to datasheet *// // // MSP430F149 // ----------------- // /|\| XIN|- // | | | HF XTAL (455k - 8Mhz) // --|RST XOUT|- // | | // | P5.4|-->MCLK = XTAL // // // M. Buccini // Texas Instruments Inc. // Feb 2005 // Built with CCE Version: 3.2.0 and IAR Embedded Workbench Version: 3.21A //****************************************************************************** #include <msp430.h> int main(void) { volatile unsigned int i; WDTCTL = WDTPW + WDTHOLD; // Stop WDT P5DIR |= 0x10; // P5.4= output direction P5SEL |= 0x10; // P5.4= MCLK option select BCSCTL1 |= XTS; // ACLK= LFXT1 = HF XTAL do { IFG1 &= ~OFIFG; // Clear OSCFault flag for (i = 0xFF; i > 0; i--); // Time for flag to set } while ((IFG1 & OFIFG)); // OSCFault flag still set? BCSCTL2 |= SELM_3; // MCLK= LFXT1 (safe) for (;;); // Do nothing }