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.

CC1310 EasylinkRF switch in code from TX to RX -> EasyLink_abort()

Other Parts Discussed in Thread: CC1310

My application is a sensor node:

- Sends tx data once a 5 minutes

- Is in RX mode the rest of the time

What works:

- Send tx data once a 5 minutes

or 

- Receive data from interrupt

What does not work:

- Be in  receive mode -> EasyLink abort -> send something

What I try to do:

- Be in receive mode -> switch to send mode -> send something -> be in receive mode.

Application is almost done and ready for customer but I can't seem to get this to work.

It always fails when doing EasyLink abort with various 'status errors' depending on what I try.

If at all possible It would be best If a TI employee could make a really simple example that:

Sends something -> goes in rx mode -> sends something ....

using the EasyLink 'driver' .

Using the node example requires a complete code overhaul since it does not use the Easylink Driver.

My used functions and some parts of the code can be found here:

http://pastebin.com/5fF629UA

I appreciate any help. Need to get this done ASAP

  • Anyway ... turns out the concentrator example uses easylink but still the issue is there that the abort function does not seem to work.

    Any reply from TI ?

  • Hi Thijs,

    Like you say, this sounds like exactly what the WSN Concentrator example does.

    When you say that it doesn't work, what do you mean? This is exactly how the Concentrator operates.

    Best regards,
    Niklas
  • anyway the problem still is there.
    Easylink.c
    The easylink abort() function just hangs due to this line:
    "
    /* Wait for Command to complete */
    RF_EventMask result = RF_pendCmd(rfHandle, asyncCmdHndl, (RF_EventLastCmdDone | RF_EventCmdError |
    RF_EventCmdAborted | RF_EventCmdCancelled | RF_EventCmdStopped));
    "
    For whatever reason this is acting as a while(1) loop with no timeout implemented.
    Causing the program to "hang" in this spot.

    Using newest tirtos, xtc tools and fully updated
  • any update on this? abort() should work...
  • There will be an new TI-RTOS version in a couple of days. In that release, the EasyLink_abort function has been re-written:

    EasyLink_Status EasyLink_abort(void)
    {
        EasyLink_Status status = EasyLink_Status_Cmd_Error;
    
        if(!configured)
        {
            return EasyLink_Status_Config_Error;
        }
        //check an Async command is running, if not return success
        if(asyncCmdHndl == NULL)
        {
            return EasyLink_Status_Success;
        }
    
        //force abort (gracefull param set to 0)
        if(RF_cancelCmd(rfHandle, asyncCmdHndl, 0) == RF_StatSuccess)
        {
           /* Wait for Command to complete */
           RF_EventMask result = RF_pendCmd(rfHandle, asyncCmdHndl, (RF_EventLastCmdDone | RF_EventCmdError |
                   RF_EventCmdAborted | RF_EventCmdCancelled | RF_EventCmdStopped));
    
           if (result & RF_EventLastCmdDone)
           {
               status = EasyLink_Status_Success;
           }
        }
        else
        {
           status = EasyLink_Status_Cmd_Error;
        }
    
        return status;
    }

    BR

    Siri

  • Thanks. Now the question becomes if we can get it to also switch from RX back to TX mode and then to RX mode.... Can you tell us what else has been fixed/rewritten (pre-release notes) to this version of RTOS for CC1310?
  • So I checked the release notes for TIRTOS 2_16_00_08 release and don't see any thing related to easylink Abort in there... has it been fixed/??

    software-dl.ti.com/.../release_notes_tirtos_cc13xx_cc26xx_2_16_00_08.html
  • It is likely that the issue you have observed is related to the below thread, and has been resolved in the 2_16_00_08 release. It does not appear in any release notes as the issue was opened and close between 2 releases so does not appear as an open issue and any release notes.

    e2e.ti.com/.../1773555

    Regards, TC.
  • New hardware revision, finally testing abort function and ... there is still a problem ... but it can be done with a workaround...
    Doing abort in a uart rx interrupt = big no no , stays stuck in abort (even with latest release).

    Solution set a global flag / variables in your uart rx interrupt and then exit the interrupt.

    handle these ( thus aborting rf etc..) in your application task function instead of the uart rx interrupt.

    This way it works for me...
    So there is still some work to be done on the cc1310 drivers
  • You should not call driver API's from an HWI or SWI, you should always post and event or semaphore and have your task call the driver API's.

    Can you illiterate on the issue / work around you mentioned?

  • Hello,

    I am fairly new to CC1310 and I am trying to get Easylink TX and RX task to work together. I have merged both tasks together and they work just fine independently.

    However, when I have both running with my custom semaphores, nothing runs.

     Is there an example code for CC1310 where we have txTask_init(ledPinHandle) and rxTask_init(ledPinHandle) working together on the CC1310 Launchpad?

    I am trying to have a code that enters the rxTask, waits there until it receives a packet, then blocks the rxTask starts the TX task and transmits a message.

    Any help is truly appreciated.

  • The rfEasyLinkRx example show how to correctly use the abort to Exit Rx. If you modify this code to do a Tx after the abort completes it will work. If not please post you modified rfEasyLinkRx and we can help.

    Regards,
    TC.
  • Hello TC.

    Thank you for the reply.

    Lenio already helped me with this issue and I posted source code solution in another thread where I have posted the working example of Easylink RX and Easylink TX.

    Sincerely,
    Admir Maglajlic