TI中文支持网
TI专业的中文技术问题搜集分享网站

EZ430-RF2500

单片机MSP430F2274进入低功耗LPM3,是不是一定要外接晶振,才能进入LPM3模式,进入LPM3时候,测到的电流不是手册上的1.4uA.同时,

另外一个问题,F2274外接晶振的时候,按照引脚的定义只能接P2.6和P2.7,但是这两个管教已经被套件定义控制和CC2500连接,能否使得这个IO功能复用,既接受晶振信号,又控制CC2500呢?8270.新建 DOC 文档.doc

Susan Yang:

1 您是如何测量电流的?使用的是哪个程序?

对于LPM3 mode下功耗的测试,需要选定ACLK的时钟源, 是内部VLO还是LFXT1。因为在LPM3下,MSP430的系统时钟只有ACLK可用,MCLK和SMCLK均不可用。而当ACLK的时钟源选择不同时,LPM3 mode下,MSP430的功耗是不同的。

另外,在测量时,为确保程序成功跑到LPM3模式下。最好能够在进入LPM3之前有个指示,譬如让某个LED灯亮0.5s再灭掉。一定要记得进入LPM3时,灭掉LED, 因为一个LED灯亮,本身就很耗电的,有时会高达2mA。而为什么要有指示呢?是因为当采用LFXT1作为ACLK时钟源时,在程序中需要check LFXT1是否成功起振,万一用户忘记焊LFXT1,或者是低频晶体没有起振,那么就会导致程序一直处于check flag,而不会进入LPM3。在这些情况下,如果没有指示,当对功耗测量时,就会发现测量结果与数据手册上LPM3下的功耗不符。

另外,切记判断LFXT1是否起振,千万不要直接用示波器测量低频晶体的管脚,因为LFXT1本身是非常脆弱的,一旦外部有波动,就会停振。建议将LFXT1作为ACLK时钟源,然后将ACLK从对应管交输出后,用示波器进行观察。

关于功耗测量,我们有专门的FAQ

e2echina.ti.com/…/467.msp430

2晶振引脚一般不可以复用的,会影响其功能

user6333565:

回复 Susan Yang:

测功耗这个问题 ,我想标定他处于LPM3模式的时间长度,怎么测呢,电流只有几微安,串联电阻用示波器也看不了,本身示波器悬空就有10几毫伏电压。请问️什么方法吗,因为我程序里面设置了几种不同模式,所以想要标定时间

Susan Yang:

回复 user6333565:

您可以尝试使用EnergyTrace 技术,是可以设置测试时间的

www.ti.com.cn/…/ENERGYTRACE

我之前用它测过其他型号的芯片,EZ430-RF2500没有测试过。不过在E2E上有一些测试过程分享,

e2e.ti.com/…/703079

user6333565:

回复 Susan Yang:

那有没有传统的测试方法呢 用示波器和其他设备 你这个方法还得再买仪器设备

Susan Yang:

回复 user6333565:

不知您是否有MSP-FET或者MSP430其他开发板(带有ez-fet)? 这样您就不需要额外购买仪器了。

使用MSP-FET连入eZ430-RF2500板上的相应管脚上(VCC,GND,TEST,RST)或者您可以尝试使用其他开发板如MSP-EXP430FR5969的仿真部分将EnergyTrace与eZ430-RF2500上的F2274一起使用

传统测量方法的话,在之前提到的FAQ中有说明 (四.MSP430功耗的测量)

e2echina.ti.com/…/467.msp430

标定处于LPM3模式的时间长度,您可以使用timer来唤醒LPM模式

user6333565:

回复 Susan Yang:

我这边有MSP430-FET,请问有具体测量方法,你好像没具体说到结合FET怎么做到energy trace,谢谢

user6333565:

回复 Susan Yang:

用timer唤醒LPM模式是什么意思 ,您可以细说下吗 谢谢

Susan Yang:

回复 user6333565:

如需获取有关 EnergyTrace 软件的用户指南,请参阅《适用于 MSP430™ MCU 的 Code Composer Studio™ IDE 用户指南》

的第4章 4 EnergyTrace™ Technology

www.ti.com/…/slau157as.pdf

Susan Yang:

回复 user6333565:

在LMP3下,ACLK remains active.

您可以使用定时器timer将ACLK设为时钟源,产生定时中断来从LPM3模式下唤醒芯片

例程中给出的是WDT来唤醒,您可以参考一下

/* --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--*/
//******************************************************************************
//MSP430F22x4 Demo - Basic Clock, LPM3 Using WDT ISR, 32kHz ACLK
//
//Description: This program operates MSP430 normally in LPM3, pulsing P1.0
//at 4 second intervals. WDT ISR used to wake-up system. All I/O configured
//as low outputs to eliminate floating inputs. Current consumption does
//increase when LED is powered on P1.0. Demo for measuring LPM3 current.
//ACLK = LFXT1/4 = 32768/4, MCLK = SMCLK = default DCO ~1.2MHz
////* External watch crystal on XIN XOUT is required for ACLK *//
//
//MSP430F22x4
//---------------
///|\|XIN|-
//| || 32kHz
//--|RSTXOUT|-
//||
//|P1.0|-->LED
//
//A. Dannenberg
//Texas Instruments Inc.
//April 2006
//Built with CCE Version: 3.2.0 and IAR Embedded Workbench Version: 3.41A
//******************************************************************************
#include <msp430.h>volatile unsigned int i;int main(void)
{BCSCTL1 |= DIVA_2;// ACLK/4WDTCTL = WDT_ADLY_1000;// WDT 1s/4 interval timerIE1 |= WDTIE;// Enable WDT interruptP1DIR = 0xFF;// All P1.x outputsP1OUT = 0;// All P1.x resetP2DIR = 0xFF;// All P2.x outputsP2OUT = 0;// All P2.x resetP3DIR = 0xFF;// All P3.x outputsP3OUT = 0;// All P3.x resetP4DIR = 0xFF;// All P4.x outputsP4OUT = 0;// All P4.x resetwhile(1){__bis_SR_register(LPM3_bits + GIE);// Enter LPM3, enable interruptsP1OUT |= 0x01;// Set P1.0 LED onfor (i = 5000; i > 0; i--);// DelayP1OUT &= ~0x01;// Clear P1.0 LED off}
}#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector = WDT_VECTOR
__interrupt void watchdog_timer(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(WDT_VECTOR))) watchdog_timer (void)
#else
#error Compiler not supported!
#endif
{__bic_SR_register_on_exit(LPM3_bits);// Clear LPM3 bits from 0(SR)
}

user6333565:

回复 Susan Yang:

请问IAR可以做energy trace不 还是说一定要用CCS软件呢

赞(0)
未经允许不得转载:TI中文支持网 » EZ430-RF2500
分享到: 更多 (0)