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 zstack home 1.2.2a 低功耗模式PM2串口无法正常工作

if (events & ZCL_DEVICE_OPEN_DOOR_EVENT)
{

osal_pwrmgr_task_state(zclOnOffLight_TaskID, PWRMGR_HOLD);
osal_pwrmgr_device(PWRMGR_ALWAYS_ON);
uint8 writedatalen = 0;
PERCFG = 0x00;
P0SEL |= BV(3); //TX
P0DIR |= BV(3);
P0INP &= ~BV(3);
P2INP &= ~BV(3);

// HalUARTResume();

// HalUARTResume();
DelayMS2(20);//20ms
U0UCR |= BV(7);
// MicroWait(10000);
writedatalen = HalUARTWrite(0,u8_zbOpenDoorBuf,6);
// DelayMS2(100);
// MicroWait(60000);
if ( writedatalen == 6 )
{
// HalUARTSuspend();
opendoorlockcount = 0;

// osal_pwrmgr_device(PWRMGR_ALWAYS_ON);
// osal_pwrmgr_device(PWRMGR_BATTERY);
osal_start_timerEx(zclOnOffLight_TaskID,
ZCL_DEVICE_WEEK_UP_IO_EVENT,
10000);
osal_pwrmgr_task_state(zclOnOffLight_TaskID, PWRMGR_CONSERVE);
osal_pwrmgr_device(PWRMGR_BATTERY);
}

}

本意唤醒CPU后,HOLD住电源,让串口发送数据,但发送数据不完整