![Texas Instruments CC2533 User Manual Download Page 321](http://html.mh-extra.com/html/texas-instruments/cc2533/cc2533_user-manual_1094592321.webp)
Link Layer Engine
If the CRC is correct, the sequence number is checked against the sequence number stored in
PRF_ADDR_ENTRYn.SEQSTAT.SEQ
. If the sequence numbers are equal and
PRF_ADDR_ENTRYn.SEQSTAT.VALID
is 1, the two last received CRC bytes are compared against the 2
bytes in
PRF_ADDR_ENTRYn.LASTCRC
. If they are equal, the packet is determined to be a retransmission
which can be ignored. If the CRC is 1 byte only, the received CRC byte is compared to
PRF_ADDR_ENTRYn.LASTCRC[0]
only, and if there is no CRC, the comparison is always viewed as
equal. If the packet was a retransmission, the IGN bit of the RES byte in the status field is set if a status
field is configured. After reception of a packet with CRC OK and which fit in the Rx FIFO,
PRF_ADDR_ENTRYn.SEQSTAT.VALID
is set to 1,
PRF_ADDR_ENTRYn.SEQSTAT.SEQ
is set to the
sequence number of the header of the received packet, and
PRF_ADDR_ENTRYn.LASTCRC
is set to the
value of the last two received CRC bytes.
If the Rx FIFO becomes full while receiving a packet, the packet is discarded from the FIFO and no more
bytes are stored in the Rx FIFO, but the packet is received to its end. After that, it is checked whether the
packet would be discarded from the Rx FIFO anyway due to the setting of
PRF_FIFO_CONF
. If so, the
task proceeds as normally. Otherwise, an
RXFIFOFULL
error interrupt is raised, and no acknowledgment
is transmitted. The sequence number is not updated so that a retransmission of the packet is not ignored.
If the received packet was not a retransmission and
PRF_ADDR_ENTRYn.SEQSTAT.ACK_PAYLOAD_SENT
is 1, the packet is seen as a confirmation of the last transmitted acknowledgment payload. If so,
PRF_ADDR_ENTRYn.SEQSTAT.ACK_PAYLOAD_SENT
is set to 0, a
TXDONE
interrupt is raised, and the
PRF_ADDR_ENTRYn.NTXDONE
counter is incremented.
PRF_ADDR_ENTRYn.ACKLENGTHk
is set to 0 for
the k found in
PRF_ADDR_ENTRYn.SEQSTAT.NEXTACK
, and
PRF_ADDR_ENTRYn.SEQSTAT.NEXTACK
is
inverted.
After receiving a packet, the LLE raises an interrupt to the MCU. Depending on the CRC result, the
payload length, and whether the received packet is a retransmission to be ignored, the interrupts are
generated as shown in
. The table also shows which of the counters among the RAM registers
are to be updated.
Table 25-17. Interrupt and Counter Operation for Received Messages
CRC Result
Ignore
Length
Counter Incremented
Interrupt Raised
OK
No
>
0
RXOK
PRF_ADDR_ENTRYn.N_RXOK
OK
No
= 0
RXEMPTY
PRF_ADDR_ENTRYn.N_RXOK
OK
Yes
X
RXIGNORED
PRF_ADDR_ENTRYn.N_RXIGNORED
NOK
X
X
RXNOK
PRF_ADDR_ENTRYn.N_RXNOK
After reception of a packet, the next action is determined as follows:
•
If the CRC of the received packet was not correct, the treatment of the packet is finished and the next
action is as described in
•
If
PRF_ADDR_ENTRYn.CONF.AA
is 0, the treatment of the packet is finished and the next action is as
described in
.
•
If the NO_ACK bit of the received header is 1 and the CRC was correct, the treatment of the packet is
finished and the next action is as described in
•
If the packet did not fit in the Rx FIFO and was not otherwise to be discarded, the treatment of the
packet is finished and the next action is as described in
•
Otherwise, an acknowledgment is transmitted as described in the following text.
After receiving a packet where the CRC is correct and where an acknowledgment is supposed to be sent,
the transmitter is configured. The transmission starts at a time given by the
PRF_RX_TX_TIME
register.
Synthesizer recalibration is performed only if there is time. The LLE checks
PRF_ADDR_ENTRYn.SEQSTAT.NEXTACK
to find k. If
PRF_ADDR_ENTRYn.ACKLENGTHk
is nonzero,
payload is included the packet. In this case,
PRF_ADDR_ENTRYn.SEQSTAT.ACK_PAYLOAD_SENT
is set
to 1 by the LLE. The transmitted packet has the same sync word and address as the received packet. If
PRF_ADDR_ENTRYn.CONF.TXLEN
is 0, the length field in the header is set equal to
PRF_ADDR_ENTRYn.ACKLENGTHk
. If
PRF_ADDR_ENTRYn.CONF.TXLEN
is 1, the length field is set to 11
0011 for a 9-bit header and to 011 0011 for a 10-bit header. Note that a value of 0 for
321
SWRU191C
–
April 2009
–
Revised January 2012
CC2541 Proprietary Mode Radio
Copyright
©
2009
–
2012, Texas Instruments Incorporated