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.

求助,关于CC2530在osal调度下PM2模式休眠和工作时间问题?

Other Parts Discussed in Thread: CC2530, Z-STACK

请教一个问题
cc2530(zstack-2.2.2-1.3.0),osal调度的PM2模式,如何自定义休眠时间和工作时间?


我现在是在ZED的

void zb_HandleOsalEvent( uint16 event )

{

.................


if ( event & MY_PERSONAL_ENTERPM2_EVT ) 
{
//P1_1 ^= 1;
myApp_StopReporting();
NLME_SetPollRate(myEnterpm2Period); // 60 000ms = 1 min

osal_start_timerEx( sapi_TaskID, MY_PERSONAL_ENTERPM2_EVT, myEnterpm2Period );
}

}


static uint16 myEnterpm2Period = 30000; 的时候,休眠30s,发送20s

static uint16 myEnterpm2Period = 40000; 的时候,休眠40s, 还是 发送20s

static uint16 myEnterpm2Period = 60000; 貌似直接就乱套了,也不休眠了,总是在发送


休眠时间 和 工作的时间,究竟怎么来做限制?

而在osal下,最大的休眠时间应该是65ms左右才对啊?

那工作时间,又该怎么来约束?