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.

关于2541的唤醒

Other Parts Discussed in Thread: CC2541

我现在使用2541的demo工程,当设为省电模式时
按键后30秒设备可查找
 
我们需要的是没有按键的省电模式,比如advertise 100ms,休眠1秒
 
我做如下的初始化:
    uint8 initial_advertising_enable = TRUE;
    // By setting this to zero, the device will go into the waiting state after
    // being discoverable for 30.72 second, and will not being advertising again
    // until the enabler is set back to TRUE
    uint16 gapRole_AdvertOffTime = 1000;
 
...(其他初始化使用默认)
 
          // Set fast advertising interval for user-initiated connections (仿照按键响应代码)
    GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MIN, DEFAULT_FAST_ADV_INTERVAL );
    GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MAX, DEFAULT_FAST_ADV_INTERVAL );
    GAP_SetParamValue( TGAP_GEN_DISC_ADV_MIN, 100 );
 
修改了osal_pwrmgr_powerconserve函数使上电后一分钟才能休眠,让advertise有机会执行:
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  && osal_GetSystemClock()>60000)
  {
    ...
 
现在的问题是,休眠后无法自动唤醒发advertise,请问应该如何解决?