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.

CC2650: Bluetooth forum

Part Number: CC2650

Hello

I'm using "cc2650" to create a send/receive program.

At this time, "Tx→Rx runs well, but freezes when it becomes ”Rx→Tx”.

Can someone give me a hint of a solution?

Sample program ↓↓

static void HubFunction(UArg arg0, UArg arg1)
{

/* Initialize EasyLink DBeacon receive 2480Hz*/
if(EasyLink_init(19) != EasyLink_Status_Success)
{System_abort("EasyLink_init failed");}

usprintf_mng("Start Hub clock\n\n");
Clock_start(functionClockHandle);


while(1){

events = Event_pend(radioOperationEventHandle, NULL, RADIO_EVENT_ALL, BIOS_WAIT_FOREVER);
usprintf_mng("%d\n",EasyLink_abort());

if (events & RADIO_EVENT_LISTEN_DATA){

/* transmit Initial connection Ack */
//if(EasyLink_transmit_Ack(&Ack) != EasyLink_Status_Success)
// {usprintf_mng("EasyLink_transmit_Ack failed");}

/* receive Node packet */
usprintf_mng("DATA\n");
if(EasyLink_receiveAsync_Data(RxDoneCallback_Data,&tPacket) != EasyLink_Status_Success)
{usprintf_mng("EasyLink_receiveAsync_Data failed");}

/* transmit Initial connection Ack */
if(EasyLink_transmit_Ack(&Ack) != EasyLink_Status_Success)
{usprintf_mng("EasyLink_transmit_Ack failed");}

}
}

////////////////////////////////////////////////////////////////////////////////////////////////////
static void Tasksort(UArg arg0)
{
/*Counter*/
sequencenum++;
Slotnum=sequencenum%IBI;
Internum=sequencenum/IBI;
ReceiveAsync=0;

Hub_TimeSlot=(RF_getCurrentTime()/4000);
if(sequencenum==0){ time = Hub_TimeSlot; }

usprintf_mng("%d[%d/%03dms]",Slotnum,Internum,Hub_TimeSlot-time);

/* Node data listen timing */
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 status = EasyLink_Status_Rx_Error;
rfc_dataEntryGeneral_t *pDataEntry;

if ( (!configured) || suspended)
{
return EasyLink_Status_Config_Error;
}

if ( (Semaphore_pend(busyMutex, 0) == FALSE) || (EasyLink_CmdHandle_isValid(asyncCmdHndl)) )

{
return EasyLink_Status_Busy_Error;
}

//DrxCb = cb;
pDataEntry = (rfc_dataEntryGeneral_t*) rxBuffer;

pDataEntry->length = 1 + EASYLINK_MAX_ADDR_SIZE + EASYLINK_MAX_DATA_LENGTH;
//pDataEntry->length = 1 + EASYLINK_MAX_ADDR_SIZE + (200); //472
pDataEntry->status = 0;
dataQueue.pCurrEntry = (uint8_t*) pDataEntry;
dataQueue.pLastEntry = NULL;
EasyLink_cmdPropRxAdv.pQueue = &dataQueue; /* Set the Data Entity queue for received data */
EasyLink_cmdPropRxAdv.pOutput = (uint8_t*)&rxStatistics;

//Stert trigger
EasyLink_cmdPropRxAdv.startTrigger.triggerType = TRIG_NOW;
//EasyLink_cmdPropRxAdv.startTrigger.pastTrig = 1;
EasyLink_cmdPropRxAdv.startTime = RF_getCurrentTime()+(10*4000);

//End trigger
//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;

//Clear the Rx statistics structure
memset(&rxStatistics, 0, sizeof(rfc_propRxOutput_t));

asyncCmdHndl =RF_postCmd(rfHandle, (RF_Op*)&EasyLink_cmdPropRxAdv,
RF_PriorityNormal, rxDoneCallback_Data, EASYLINK_RF_EVENT_MASK);

if (EasyLink_CmdHandle_isValid(asyncCmdHndl))
{
status = EasyLink_Status_Success;
}

return status;
}