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.