你好
我正在使用"cc2650"创建发送/接收程序。
此时,“Tx→Rx 运行良好,但在变为“Rx→Tx”时冻结。
有人能给我一个解决方案的提示吗?
样片程序↓↓
静态空 HubFunction (UArg0、UArgarg1)
{
/*初始化 EasyLink DBeacon 接收2480Hz*/
if (EasyLink_init (19)!= EasyLink_Status_Success)
{System_abort ("EasyLink_init failed");}
usprintf_mng ("启动集线器时钟\n"\n);
Clock_start (functionClockHandle);
while (1){
事件= Event_pend (radioOperationEventHandle、NULL、RADIO_EVENT_ALL、BIOS_WAIT_FOREVE);
usprintf_mng ("%d\n"、EasyLink_abort());
if (events & radio_event_listen_data){
/*传输初始连接 Ack */
//if (EasyLink_Transmit _Ack (&Ack)!= EasyLink_Status_Success)
//{usprintf_mng ("EasyLink_Transmit _Ack failed");}
/*接收节点数据包*/
usprintf_mng ("data\n");
if (EasyLink_receiveASYNC_Data (RxDoneCallback_Data、&tPacket)!= EasyLink_Status_Success)
{usprintf_mng ("EasyLink_receiveASYNC_Data failed");}
/*传输初始连接 Ack */
if (EasyLink_Transmit _Ack (&Ack)!= EasyLink_Status_Success)
{usprintf_mng ("EasyLink_Transmit _Ack failed");}
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
静态空任务排序(UARg arg0)
{
/*计数器*/
sequencenum++;
slotNum=sequencenum%IBI;
internum=sequencenum/IBI;
ReceiveASYNC=0;
HUD_timeslot=(RF_getCurrentTime ()/4000);
if (sequencenum=0){time = Hub_timeslot;}
usprintf_mng ("%d[%d/%03dms]"、slotNum、Internum、Hub_timeslot-time);
/*节点数据侦听计时*/
if (slotNum =NodeSlot){
EVENT_POST (radioOperationEventHandle、radio_EVENT_Listen_data);
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//EasyLink_receiveASYNC_Data
// //
EasyLink_Status EasyLink_receiveASYNC_Data (EasyLink_DReceiveCb CB、EasyLink_testPacket *txPacket)
{
EasyLink_Status 状态= EasyLink_Status_Rx_Error;
RFC_dataEntryGeneral_t *pDataEntry;
如果(!已配置)||已暂停)
{
返回 EasyLink_Status_Config_Error;
}
if ((Semaphore_pend (busyMutex、0)== false)||(EasyLink_CmdHandle_IsValid (asyncCmdlle)))
{
返回 EasyLink_Status_Busy_Error;
}
//DrxCb = CB;
pDataEntry =(RFC_dataEntryGeneral_t*) rxBuffer;
pDataEntry ->长度= 1 + EasyLink_MAX_ADDR_SIZE + EasyLink_MAX_DATA_LENGTH;
//pDataEntry ->长度= 1 + EasyLink_MAX_ADDR_SIZE +(200);//472
pDataEntry ->状态= 0;
dataQueue.pCurrent 尝试=(uint8_t*) pDataEntry;
dataQueue.pLastEntry =空;
EasyLink_cmdPropRxadv.pQueue =&dataQueue;//设置接收数据的数据实体队列*/
EasyLink_cmdPropRxadv.pOutput =(uint8_t*)&rxStatistics;
//Stert 触发器
EasyLink_cmdPropRxAdv.startTrigger.triggerType = trig_now;
//EasyLink_cmdPropRxAdv.startTrigger.PastTrig = 1;
EasyLink_cmdPropRxAdv.StartTime = RF_getCurrentTime ()+(10*4000);
//结束触发
//EasyLink_cmdPropRxAdv.endTrigger.triggerType = trig_ABSTIME;
//EasyLink_cmdPropRxAdv.EndTime = RF_getCurrentTime ()+(40*4000);
EasyLink_cmdPropRxAdv.endTrigger.triggerType = trig_REL_start;
EasyLink_cmdPropRxAdv.EndTime =(40*4000);
//EasyLink_cmdPropRxAdv.endTrigger.triggerType = trig_never;
//EasyLink_cmdPropRxAdv.EndTime = 0;
//清除 Rx 统计结构
memset (&rxStatistics、0、sizeof (RFC_propRxOutput_t));
asyncCmdlf =RF_postCmd (rfHandle、(RF_OP*)&EasyLink_cmdPropRxAdv、
rf_PriorityNormal、rxDoneCallback_Data、EasyLink_RF_EVENT_MASK);
if (EasyLink_CmdHandle_IsValid (asyncCmdlnk))
{
状态= EasyLink_Status_Success;
}
退货状态;
}