打印

请教: CC2541進不了低功耗,pwrmgr_task_state 一直为2

[复制链接]
1756|10
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
tomgl|  楼主 | 2016-10-17 18:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 tomgl 于 2016-10-18 10:12 编辑

可以進到下面的低功耗管理模块中

void osal_pwrmgr_powerconserve( void )
{
  uint32        next;
  halIntState_t intState;
  // Should we even look into power conservation
  if ( pwrmgr_attribute.pwrmgr_device != PWRMGR_ALWAYS_ON )
  {
    // Are all tasks in agreement to conserve
    if ( pwrmgr_attribute.pwrmgr_task_state == 0 )     //这里一直是pwrmgr_task_state=2
    {
      // Hold off interrupts.
      HAL_ENTER_CRITICAL_SECTION( intState );

      // Get next time-out
      next = osal_next_timeout();
   
      // Re-enable interrupts.
      HAL_EXIT_CRITICAL_SECTION( intState );
      // Put the processor into sleep mode
      OSAL_SET_CPU_INTO_SLEEP( next );
    }
  }
}

相关帖子

沙发
lihuami| | 2016-10-17 22:03 | 只看该作者
这是哪里的函数?

使用特权

评论回复
板凳
lihuami| | 2016-10-17 22:07 | 只看该作者
配置的问题吗?

使用特权

评论回复
地板
tomgl|  楼主 | 2016-10-18 10:14 | 只看该作者
配置上已经配置POWER_SAVING=TRUE

使用特权

评论回复
5
dirtwillfly| | 2016-10-18 11:32 | 只看该作者
在这段程序发现问题,但问题不一定发生在这里。追踪一下是哪里阻止进入低功耗了。

使用特权

评论回复
6
tomgl|  楼主 | 2016-10-18 11:42 | 只看该作者
就是在这个地方
if ( pwrmgr_attribute.pwrmgr_task_state == 0 )   

这里的pwrmgr_task_state一直等于2

使用特权

评论回复
7
haokeer| | 2016-10-18 21:58 | 只看该作者
找找原因,你的低功耗使能没有起到应有的作用吧

使用特权

评论回复
8
tomgl|  楼主 | 2016-10-19 12:47 | 只看该作者
其实在另一个工程现在低功耗已经用起来了,每休眠2秒唤醒一次,唤醒后向从机发一次数据,然后再休眠2秒

但在这个工程中就卡在这里進不了休眠,有点奇怪,因时间紧没有太多去比较

使用特权

评论回复
9
xiaolong12| | 2016-10-19 20:05 | 只看该作者
用文件比较器,可以轻松的比较两个c文件之间的区别,很方便的。

使用特权

评论回复
10
tomgl|  楼主 | 2016-10-20 16:14 | 只看该作者
是啊,等有时间,用svn比较一下看

看能不能捉住这个“妖怪”

使用特权

评论回复
11
Rangar| | 2016-10-21 21:31 | 只看该作者
可能是低功耗使能没有进去

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

28

主题

52

帖子

1

粉丝