how to implement csma/ca algorithm using msp430f5438a+cc2520 in IAR for msp430 workbench
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.
how to implement csma/ca algorithm using msp430f5438a+cc2520 in IAR for msp430 workbench
Correct. CSMA-CA is something that is specified in 802.15.4 specification. As ZigBee and TI-MAC use an 802.15.4 standard, CSMA/CA handling is taken care of in the stack itself.
Thanks,
TheDarkSide
yes
i am using TIMAC.....i need to send data from one node to another using csma/ca ...if i send data using csma/ca where can i see output ....where can change csma/ca modifications in the TIMAC code
-my main task is
Hello Naresh Babu,
For your question:
-my main task is
Also for your another question:
i am using beacon enabled mode...how to initialize beacon frame in csma/ca..because slotted csma/ca is beacon enabled mode
Acknowledgment and beacon frames are sent without using a CSMA-CA mechanism as per IEEE 802.15.4 specification. But when using TIMAC the data frames will be sent using the CSMA-CA, application does not have to do any thing for this, TIMAC stack implement the CSMA-CA functionality.
Hope this helps. Thanks.
Hi,
the CSMA logic and code are, for the MSP430+2520 configuration, handled in mac_dualchip_tx.c module.
As you can see in this module, the unslotted and slotted management is done through a callback function that is called when the backoff timer times out, calling the corresponding function that performs the channel listening (or CCA).
Timer resources are used to count the backoff time.
CCA is performed in dualchipTxUnslottedCsmaCca for the unslotted case, while it is done in dualchipTxSlottedCsmaCca() for the slotted mode.
Backoff time is set in txCsmaPrep() function in mac_tx.c module, which is valid for both unslotted and slotted
The radio channel can be set using MAC_MlmeSetReq() API, and you can choose all channels available in 802.15.4 (11-26). Please see mac_api.h module and check out MAC_CHAN_XXX.
Once you set the corresponding channel using that API, then all the MAC activity (Rx/Tx, including therefore the CCA) will be done on that channel.
All nodes must implement CSMA-CA according to 802.15.4 standard. MinBE and MaxBE parameters and number of backoffs, which control respectively backoff exponent values and max number of backoff retries, can be set by the user, through the same API MAC_MlmeSetReq() API.
Please check standard PIB Get and Set Attributes in mac_api.h
You can check the actual backoff time by using some GPIO to time trace moment when CSMA is started (ie the actual call to macDualChipTxGoCsma) and in macTxDoneCallback(), when transmit is complete. You should see that before transmitting the time is spent randomly in CSMA+CCA, depending also on traffic channel conditions
We do not recommend you to change the CSMA code mechanics. You may want to change the parameters of the CSMA according to your application needs but if that is the case, as suggested, please use MAC_MlmeSetReq() API.
I also recommend you check out 802.15.4 MAC API document in \Documents\API fodler of your TI-MAC install
Thanks,
TheDarkSide
thank you sir,
now i got some idea...finally one doubt
->can i change in mac_tx.c MacMinBE and MacMaxBE parameter values...and then for checking purpose how many nodes are needed(i am having msp430f5438a+cc2520 boards)
if you want to change MinBe and MaxBE, please use MAC_MlmeSetReq() API as suggested.
For testing, you just need two nodes. One which is the device under test, and the second which will be a signal generator that creates the interference. To control the node that creates the interference, you can use SmartRFSTudio with CC25xx devices (http://www.ti.com/tool/smartrftm-studio) or basic SW examples (http://www.ti.com/lit/zip/swrc090)
Thanks,
TheDarkSide
smartRf studio already installed
msp430f5438a is suffient or any more nodes are need ...could you tell me the steps for checking csma/ca channel accessing method (signal)...my project last date is coming 28th
please help me