Texas Instruments CC2650DK Benutzerhandbuch

Seite von 1570
IEEE 802.15.4
After this wait time, the radio CPU checks the CCA state from the background-level operation, as in
CCA Monitoring. If the CCA state was Invalid, the radio CPU waits before trying again.
If csmaConfig.bSlotted = 1, the wait is for one backoff period, otherwise it waits until an RSSI result is
available. If the CCA state was Idle, the radio CPU decrements CW by 1, and if this results in a value of
zero, the CSMA-CA operation ends with success. If this results in a nonzero value, the radio CPU waits
one backoff period timed from the end of the wait time, and then checks the CCA state again as described
above.
If the channel was busy when the CCA state was checked, the radio CPU updates the variables as
follows:
CW = csmaConfig.initCW; NB += 1; BE += min(BE+1, macMaxBE);
If NB after this update is greater than macMaxCSMABackoffs, the CSMA-CA operation ends with failure.
Otherwise, the radio CPU draws a random number of backoff periods to wait as described above, and
proceeds as before. If csmaConfig.bSlotted = 1, the wait is from the next backoff period after the end of
the previous wait time; otherwise, the wait is from a configurable time after the end of the previous wait
time.
The CSMA-CA operation is depicted in a flow chart in
In addition to the CSMA-CA operation ending with success or failure as described above, the operation
can end as a result of the end trigger given by endTrigger and endTime, or by a command. The
commands that can end the CSMA-CA operation are the immediate commands CMD_ABORT,
CMD_STOP, CMD_IEEE_ABORT_FG, and CMD_IEEE_STOP_FG. When the CSMA-CA operation ends,
the radio CPU writes lastTimeStamp with the timer value at the end of the most recent wait period before
a CCA check was done, and lastRssi with the RSSI value at that time. If the operation ended because of a
timeout or stop command, the radio CPU writes remainingPeriods with the number of backoff periods
remaining of the wait time. Otherwise, the radio CPU writes remainingPeriods to 0.
The pseudo-random algorithm is based on a maximum-length 16-bit linear-feedback shift register (LFSR).
The seed is as provided in randomState. When the operation ends, the radio CPU writes the current state
back to this field. If randomState is 0, the radio CPU self-seeds by initializing the LFSR to the 16 least-
significant bits of the radio timer. There will be some randomness to this value, but this is limited,
especially for slotted CSMA-CA, and seeding with a true-random number (or a pseudo-random number
based on a true-random seed) by the system CPU is therefore recommended. If the 16 least significant
bits of the radio timer are all 0, another fixed value is substituted.
Depending on csmaConfig.rxOffMode, the underlying RX operation may be suspended during the backoff
before another CCA check, if there is enough time for it. The different values have the following meaning:
rxOffMode = 0: The radio stays on during CSMA backoffs.
rxOffMode = 1: If a frame is being received, an ACK being transmitted, or in the transition between
those, the radio stays on. Otherwise, the radio switches off until the end of the backoff period.
rxOffMode = 2: If a frame is being received, an ACK being transmitted, or in the transition between
those, the radio stays on until the packet has been fully received and the ACK has been transmitted if
applicable. After that, the radio switches off until the end of the backoff period.
rxOffMode = 3: The radio switches off immediately at the beginning of a backoff period. This aborts a
frame being received or an ACK being transmitted. The radio remains switched off until the end of the
backoff period.
If the radio switches off this way, the receiver will restart sufficiently early for the next CCA operation to be
done, and the radio only switches off it there is sufficient time. This feature can be used for power saving
in systems that do not always need to be in RX. All modes except mode 0 may cause frames to be lost, at
increasing probability.
1509
SWCU117A – February 2015 – Revised March 2015
Radio
Copyright © 2015, Texas Instruments Incorporated