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.

RTOS/LAUNCHXL-CC1310: Address re-setting issues via EasyLink_enableRxAddrFilter ()

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: SIMPLICITI, CC1310

Tool/software: TI-RTOS

hi

I have a question about rx address.

     -  The nodes perform RF tx on the addresses 0xaa and 0xbb, respectively.

     -  The address of the current concentrator is 0xaa and the filter is also set to 0xaa.

     -  If the concentrator's button is pressed., EasyLink_enableRxAddrFilter applies 0xbb.

     -  In other words, pressing the button changes the concentrator address and rxfilter setting values, and the node that communicates with the concentrator changes.

To implement the above behavior, I used EasyLink_abort (), set EasyLink_enableRxAddrFilter(), and called EasyLink_receiveAsync() .

void ConcentratorChangeFilter (void)
 {
    EasyLink_abort ();

    if (chgFlag == 0)
    {
      ConcentratorAddress = RADIO_CONCENTRATOR_ADDRESS_TWO;
      EasyLink_enableRxAddrFilter (& concentratorAddress, 1, 1);
      chgFlag = 1;
    }
    else if (chgFlag == 1)
    {
      ConcentratorAddress = RADIO_CONCENTRATOR_ADDRESS_ONE;
      EasyLink_enableRxAddrFilter (& concentratorAddress, 1, 1);
      chgFlag = 0;
    }
    if (EasyLink_receiveAsync (rxDoneCallback, 0)! = EasyLink_Status_Success) {
        System_abort ("EasyLink_receiveAsync failed");
    }
}

However, the moment the button was pressed, The cc1310 board does not work.

 

 

And  If I did not call EasyLink_receiveAsync () , I confirmed that the address changed without fail and communication became possible.

void ConcentratorChangeFilter (void)
 {
    EasyLink_abort ();

    if (chgFlag == 0)
    {
      ConcentratorAddress = RADIO_CONCENTRATOR_ADDRESS_TWO;
      EasyLink_enableRxAddrFilter (& concentratorAddress, 1, 1);
      chgFlag = 1;
    }
    else if (chgFlag == 1)
    {
      ConcentratorAddress = RADIO_CONCENTRATOR_ADDRESS_ONE;
      EasyLink_enableRxAddrFilter (& concentratorAddress, 1, 1);
      chgFlag = 0;
    }
}

I know that Calling the EasyLink_abort () function stops EasyLink_receiveAsync ().  So I think I should call EasyLink_receiveAsync () again.

Why does it only work if I did not call EasyLink_receiveAsync ()?

THANKS.

  • I have not been able to re-create your problem.

    I did my testing with the rfEasyLinkRx example:

    while(1)
    {
        addrFilter[0] = 0xAA;
        EasyLink_enableRxAddrFilter(addrFilter, 1, 1);
    
        EasyLink_receiveAsync(rxDoneCb, 0);
            
        if(EasyLink_abort() == EasyLink_Status_Success)
        {
            Semaphore_pend(rxDoneSem, BIOS_WAIT_FOREVER);
        }
        
        addrFilter[0] = 0xBB;
        EasyLink_enableRxAddrFilter(addrFilter, 1, 1);
            
        EasyLink_receiveAsync(rxDoneCb, 0);
       
        if(EasyLink_abort() == EasyLink_Status_Success)
        {
            Semaphore_pend(rxDoneSem, BIOS_WAIT_FOREVER);
        }
    }

    The code above is just meant for debugging and I was stepping through the code. After calling EasyLink_receiveAsync I checked that the radio was in RX (asyLink_cmdPropRxAdv.status = 2). I tested the EsyLink_abort() both when the RX command was active and after receiving a packet (status = 0x3400).

    When you debug, you should monitor the examples of the different commands to see what they report. Then it is easier to figure out what went wrong.

    If you are not able to solve this by debugging, please provide us with a small example based on the rfEasyLinkRx example, so that we can debug it and try to figure out why it fails.

    Siri

  • This thread is closed due to inactivity. It will be re-opened if new info is posted.