微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI Zigbee设计交流 > ZStack-CC2530-2.5.1a 的功耗问题

ZStack-CC2530-2.5.1a 的功耗问题

时间:10-02 整理:3721RD 点击:

我们正在使用ZStack-CC2530-2.5.1a 这个版本的协议栈进行开发,在进行功耗测试的时候我们发现芯片在进入了深度睡眠(halPwrMgtMode 等于HAL_SLEEP_DEEP )后,芯片还是会每隔65ms唤醒一次,具体的功耗波形如下图所示(注:测试方法为在电源输入端串联10欧姆的电阻,将示波器的接在电阻两端,图片为示波器测量到的睡眠及唤醒时候电阻两端电压变化的波形。)测试使用的工程是sampleLight-EnDdeviceEB,对工程做了以下修改(初始化完成后没有打开任何定时器,直接进入睡眠):

void zclSampleLight_Init( byte task_id )
{
zclSampleLight_TaskID = task_id;

// Set destination address to indirect
//zclSampleLight_DstAddr.addrMode = (afAddrMode_t)AddrNotPresent;
//zclSampleLight_DstAddr.endPoint = 0;
//zclSampleLight_DstAddr.addr.shortAddr = 0;

// This app is part of the Home Automation Profile
zclHA_Init( &zclSampleLight_SimpleDesc );

// Register the ZCL General Cluster Library callback functions
zclGeneral_RegisterCmdCallbacks( SAMPLELIGHT_ENDPOINT, &zclSampleLight_CmdCallbacks );

// Register the application's attribute list
zcl_registerAttrList( SAMPLELIGHT_ENDPOINT, SAMPLELIGHT_MAX_ATTRIBUTES, zclSampleLight_Attrs );

// Register the Application to receive the unprocessed Foundation command/response messages
zcl_registerForMsg( zclSampleLight_TaskID );

// Register for all key events - This app will handle all key events
RegisterForKeys( zclSampleLight_TaskID );

// Register for a test endpoint
afRegister( &sampleLight_TestEp );

//添加的内同
#if defined ( POWER_SAVING )
osal_pwrmgr_device( PWRMGR_BATTERY );
#endif
}

在Options->C/C++ Compiler->Defined symbols中的定义如下

NWK_AUTO_POLL
xZTOOL_P1
xMT_TASK
xMT_APP_FUNC
xMT_SYS_FUNC
xMT_ZDO_FUNC
xLCD_SUPPORTED=DEBUG
POWER_SAVING
HOLD_AUTO_START

我们的产品是使用电池供电的,这个65毫秒的唤醒消耗了我们大约30%的电量,请问该如何修改程序才能够避免出现这个65毫秒的唤醒?

谢谢!

功耗测试波形

默认情况下,按键是使用轮询方式来做的。

请把它改成中断方式。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top