Interrupt And Counter Operation For Received Messages - Texas Instruments CC253x User Manual

System-on-chip for 2.4ghz
Table of Contents

Advertisement

Link Layer Engine
Next, the 9-bit or 10-bit header is read. If PRF_ADDR_ENTRYn.CONF.VARLEN is 1, the length is fetched
from the header and compared against PRF_ADDR_ENTRYn.RXLENGTH. If it is greater than that value,
reception is stopped and the device goes back to sync search. If PRF_ADDR_ENTRYn.CONF.VARLEN is 0,
the length field in the received header is ignored and the packet length is read from
PRF_ADDR_ENTRYn.RXLENGTH. In both cases, the length is the number of bytes after the header and
before the CRC. The length must be less than or equal to 63 for a 9-bit header and 127 for a 10-bit
header. When a 10-bit header is used, the MCU must ensure that an entire packet can fit in the RX FIFO
for auto ACK to be possible. This limits the maximum packet size based on the settings in
PRF_FIFO_CONF.
If reception is stopped due to address mismatch or invalid length, the time-out given by
PRF_SEARCH_TIME or Timer 2 event 2 still applies. If the first packet of the task is being received and
PRF_TASK_CONF.STOP_CONF is 11, this still counts as the first packet.
If a CRC field is present, it is checked using the polynomial configured in the BSP and the initialization
value from PRF_CRC_INIT. The result of the CRC is written in the MSB of the RES byte in the status field
if a status field is configured. If the CRC is not correct and PRF_FIFO_CONF.AUTOFLUSH_CRC is 1, the
LLE sends a discard RX FIFO command to remove the packet from the RX FIFO.
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 fits 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
are to be updated.
Table 25-17. Interrupt and Counter Operation for Received Messages
CRC Result
OK
OK
OK
NOK
308
CC2541 Proprietary Mode Radio
Table
25-17. The table also shows which of the counters among the RAM registers
Ignore
Length
No
> 0
No
= 0
Yes
X
X
X
Copyright © 2009–2014, Texas Instruments Incorporated
Counter Incremented
PRF_ADDR_ENTRYn.N_RXOK
PRF_ADDR_ENTRYn.N_RXOK
PRF_ADDR_ENTRYn.N_RXIGNORED
PRF_ADDR_ENTRYn.N_RXNOK
SWRU191F – April 2009 – Revised April 2014
www.ti.com
Interrupt Raised
RXOK
RXEMPTY
RXIGNORED
RXNOK
Submit Documentation Feedback

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents