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.

LAUNCHXL-CC2650: Operation stops at irregular intervals.

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2650

Hello

I am trying to make a program on CC2650 LaunchPad.

The CC2650 stops operation at irregular intervals.

For example, runnning for 3 minute, 5 minute, 30 seconds, etc.

Why it stops?

I want to run more than 1 minute.

Please...

Tatsuki

  • Can you reproduce this on CC2650 SDK default examples?

  • Hello Tatsuki,

    I am assuming there are no modifications to the CC2650 LaunchPad which could be causing issues?  How do you confirm that the "CC2650 stops operation at irregular intervals"?  Do you have JTAG connected, actively open in an IDE debug session, or is the device free-running?  What is the intended purpose of your firmware application?

    Regards,
    Ryan

  • Hello YiKai,

    Thanks for the reply!

    Yes, I can use the default examples on CC2650.

    Tatsuki

  • Hello Ryan,

    Thanks for the reply!

    I confilm the running through the TeraTerm and JTAG is connected.

    I think the cause is something of EasyLink.

    I use many kinds of EasyLink.

    For example, EasyLink_transmit, EasyLink_init, etc.

    May be, other processes interrupted during processing?

    Any ideas?

    Please...

    Tatsuki

  • Have you tried free-running (i.e. without the JTAG connection)?  How do you modify an EasyLink example to recreate the issue you are observing?

    Regards,
    Ryan

  • Hello Ryan,

    Sorry, how do I try free-running?

    I'm observing wuth TeraTerm.

    Usually the text don't stop.

    It often stops at this point.

    eample1.txt
    EasyLink_Status EasyLink_init(int ChannelNum)
    {
        if (configured)
        {
            if (Semaphore_pend(busyMutex, 0) == FALSE)
            {
                return EasyLink_Status_Busy_Error;
            }
            RF_close(rfHandle);
        }
    
        if (!rfParamsConfigured)
        {
            RF_Params_init(&rfParams);
            rfParams.nInactivityTimeout = EasyLink_ms_To_RadioTime(1);
            rfParamsConfigured = 1;
        }
    
            //CHIP_TYPE_CC2650
            memcpy(&EasyLink_cmdPropRadioSetup.setup, &RF_cmdPropRadioDivSetup, sizeof(rfc_CMD_PROP_RADIO_SETUP_t));
            RF_cmdFs.frequency=2400+(ChannelNum+1)*2;
            memcpy(&EasyLink_cmdFs, &RF_cmdFs, sizeof(rfc_CMD_FS_t));
            memcpy(&EasyLink_RF_prop, &RF_prop, sizeof(RF_Mode));
            memcpy(&EasyLink_cmdPropRxAdv, RF_pCmdPropRxAdv_preDef, sizeof(rfc_CMD_PROP_RX_ADV_t));
            memcpy(&EasyLink_cmdPropTx, &RF_cmdPropTx, sizeof(rfc_CMD_PROP_TX_t));
    
        if (rfModeMultiClient)
        {
            EasyLink_RF_prop.rfMode = RF_MODE_MULTIPLE;
        }
    
        rfHandle = RF_open(&rfObject, &EasyLink_RF_prop,
                (RF_RadioSetup*)&EasyLink_cmdPropRadioSetup.setup, &rfParams);
    
        addrSize = 1;
        EasyLink_cmdPropRxAdv.maxPktLen = EASYLINK_MAX_DATA_LENGTH + EASYLINK_MAX_ADDR_SIZE;
        EasyLink_cmdPropRxAdv.pAddr = addrFilterTable;
        EasyLink_cmdPropRxAdv.addrConf.addrSize = addrSize;
        EasyLink_cmdPropRxAdv.pktConf.filterOp = 1;
        EasyLink_cmdPropRxAdv.pQueue = &dataQueue;
        EasyLink_cmdPropRxAdv.pOutput = (uint8_t*)&rxStatistics;
    
        //Set the frequency
        RF_runCmd(rfHandle, (RF_Op*)&EasyLink_cmdFs, RF_PriorityNormal, 0,
                EASYLINK_RF_EVENT_MASK);
    
        asyncRxTimeOut = 0;
        Semaphore_Params params;
        Error_Block eb;
        Semaphore_Params_init(&params);
        Error_init(&eb);
    
        if (busyMutex == NULL)
        {
            busyMutex = Semaphore_create(0, &params, &eb);
            if (busyMutex == NULL)
            {
                return EasyLink_Status_Mem_Error;
            }
    
            Semaphore_post(busyMutex);
        }
        else
        {
            Semaphore_post(busyMutex);
        }
        configured = 1;
    
        return EasyLink_Status_Success;
    }
    eample2.txt
    EasyLink_Status EasyLink_transmit_CBeacon(EasyLink_CBeacon *txPacket,EasyLink_TimeStamp TimeStamp)
    {
        unsigned char bitArray[8] = {0};
    
        EasyLink_Status status = EasyLink_Status_Tx_Error;
    
        if ( (!configured) || suspended)
        {
            return EasyLink_Status_Config_Error;
        }
    
        if (Semaphore_pend(busyMutex, 0) == FALSE)              //Check and take the busyMutex
        {
            return EasyLink_Status_Busy_Error;
        }
    
        if (sizeof(bitArray) > EASYLINK_MAX_DATA_LENGTH)
        {
            return EasyLink_Status_Param_Error;
        }
        //usprintf_mng("DSRList:%x\n",txPacket->fDBeacon.DSRList);
        /*****************************************/
        bitArray[7]|=txPacket->fCBeacon.TimeStamp;                          //Make any bit 32 TimeStamp
        bitArray[6]|=txPacket->fCBeacon.TimeStamp>>8;
        bitArray[5]|=txPacket->fCBeacon.TimeStamp>>16;
        bitArray[4]|=txPacket->fCBeacon.TimeStamp>>24;
    
        bitArray[3]|=txPacket->fCBeacon.InitialState;                       //Make any bit 1 InitialState
        bitArray[3]|=txPacket->fCBeacon.DCHChannelNum<<1;                   //Make any bit 6 DCHChannelNum
        bitArray[3]|=txPacket->fCBeacon.DutyCycling<<7;                     //Make any bit 2 DutyCycling
    
        bitArray[2]|=txPacket->fCBeacon.DutyCycling>>1;
        bitArray[2]|=txPacket->fCBeacon.InterferenceMitigation<<1;          //Make any bit 1 InterferenceMitigation
        bitArray[2]|=txPacket->fCBeacon.Reserved<<2;                        //Make any bit 1 Reserved
        bitArray[2]|=txPacket->fCBeacon.TimeSlots<<3;                       //Make any bit 10 TimeSlots
    
        bitArray[1]|=txPacket->fCBeacon.TimeSlots>>5;
        bitArray[1]|=txPacket->fCBeacon.SlotLen<<5;                         //Make any bit 3 SlotLen
        bitArray[0]|=txPacket->fCBeacon.HubAddr;                            //Make any bit 8 HubAddr
        /*****************************************/
    
        usprintf_mng("TransCB:%02x %02x %02x %02x %02x %02x %02x %02x\n",
                     bitArray[0],bitArray[1],bitArray[2],bitArray[3],bitArray[4],bitArray[5],bitArray[6],bitArray[7]);
    
        EasyLink_cmdPropTx.pktLen = sizeof(bitArray);
        EasyLink_cmdPropTx.pPkt = bitArray;
    
        //EasyLink_cmdPropTx.startTrigger.triggerType = TRIG_NOW;
        //EasyLink_cmdPropTx.startTrigger.pastTrig = 1;
        //EasyLink_cmdPropTx.startTime = 0;
    
        EasyLink_cmdPropTx.startTrigger.triggerType = TRIG_ABSTIME;
        EasyLink_cmdPropTx.startTrigger.pastTrig = 1;
        EasyLink_cmdPropTx.startTime = TimeStamp.StartTime;
    
        // Send packet
        RF_CmdHandle cmdHdl = RF_postCmd(rfHandle, (RF_Op*)&EasyLink_cmdPropTx,
                RF_PriorityNormal, 0, EASYLINK_RF_EVENT_MASK);
    
        // Wait for Command to complete
        RF_EventMask result = RF_pendCmd(rfHandle, cmdHdl,  (RF_EventLastCmdDone |
                RF_EventCmdError));
    
        if (result & RF_EventLastCmdDone)
        {
            status = EasyLink_Status_Success;
        }
    
        Semaphore_post(busyMutex);
        return status;
    }

    Can you find the cause?

    Tatsuki

  • Free-running means operation without the JTAG connection, typically by a hardware reset after programming the device to ensure that the debug connection is not active.  What specific lines from your code snippet does it typically stop at?  Easylink_init appears almost identical to the examples, however you may want to ensure that TimeStamp.StartTime is correctly setting the EasyLink_cmdPropTx.startTime in absolute time trigger mode.

    Regards,
    Ryan

  • Hello Ryan,

    It stops regardless of free-running.

    It often stops at receive phase.

    I think proper error proccess was not done, so I set the EASYLINK_RF_EVENT_MASK.

    Then the times of stopping become fewer.

    Tatsuki

  • The code you have shared does not show EasyLink RX commands, EasyLink_cmdPropRx.  I recommend that you closely follow the existing CC2650 EasyLink examples and make incremental changes to discover which modification causes the code to fail.  You should also refer to RF TI Drivers Runtime APIs to further understand how RF_runCmd is a combination of RF_postCmd and RF_pendCmd.

    Regards,
    Ryan