if(events?&?HAL_SLEEP_EVENT) { ????PRINT("flag_sleep:%d\n",flag_sleep); ????if(flag_sleep) ????{ ????????GPIOB_SetBits(GPIO_Pin_10);//關(guān)閉指示燈 ????????flag_sleep?=?0; ????????status?=?0;//將狀態(tài)設(shè)置為休眠中 ????????PRINT("sleep\n"); ????????DelayMs(1); ????????LowPower_Sleep(RB_PWR_RAM14K|RB_PWR_RAM2K);//休眠?阻塞在此處 ????????SetSysClock(?CLK_SOURCE_HSI_32MHz?); ????????HSECFG_Current(?HSE_RCur_100?);?????//?降為額定電流(低功耗函數(shù)中提升了HSE偏置電流) ????} ????tmos_start_task(?halTaskID?,?HAL_SLEEP_EVENT?,MS1_TO_SYSTEM_TIME(50)); ????return?events?^?HAL_SLEEP_EVENT; }
大家好!我設(shè)置的是僅GPIO中斷喚醒睡眠,但我發(fā)現(xiàn)喚醒后(已將flag_sleep置為0),上述事件沒有循環(huán)執(zhí)行,請問這是什么原因?