Interrupt And Counter Operation For Received Ack Packets - 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. The maximum allowed value of
this register is 32. If the received length is greater than PRF_ADDR_ENTRYn.RXLENGTH, 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,
which should normally be 0 in this case. The length is the number of bytes after the header and before the
CRC.
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 set, the
LLE sends a discard RX FIFO command to remove the packet from the RX FIFO.
The received sequence number is written to the config byte of the RX FIFO if configured, but is otherwise
ignored.
If the RX FIFO becomes full while receiving an acknowledgment 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 to see 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, the task ends after the packet is
received and an RXFIFOFULL error interrupt is raised. In this case, the treatment of the packet is as if the
acknowledgment were not successfully received. This means that the next time a transmit task is started,
the packet is retransmitted so that the receiver retransmits the ACK payload.
After receiving an acknowledgment, the LLE raises an interrupt to the MCU. Depending on the CRC
result, the payload length, and whether the received packet had the same sequence number as the
transmitted one, the interrupts are generated as shown in
among the RAM registers are to be updated.
Table 25-19. Interrupt and Counter Operation for Received ACK Packets
CRC Result
OK
OK
NOK
If an acknowledgment was not received (because no sync was obtained in time, the address did not
match, the sequence number was wrong, the CRC check failed, or the ACK did not fit in the RX FIFO and
was not otherwise to be discarded) the LLE sends a retry TX FIFO command. If the number of
retransmissions already performed (not including the original transmission) is equal to
PRF_RETRANS_CNT, the task ends. Otherwise, the packet is retransmitted. The time from the end of the
previous transmission to the start of the retransmission is given in units of 62.5 ns by
PRF_RETRANS_DELAY.
If the received packet was a valid acknowledgment, or if a packet was completely read out of the TX FIFO
and no acknowledgment was expected, the LLE sends a deallocate TX FIFO command if
PRF_ADDR_ENTRYn.REUSE is 0. Otherwise, the MCU must issue either a deallocate TX FIFO (to send a
new packet) or a retry TX FIFO (to reuse) before sending again. The PRF_ADDR_ENTRYn.NTXDONE
counter is incremented. A TXDONE interrupt to the MCU is raised. If
PRF_ADDR_ENTRYn.CONF.FIXEDSEQ = 0, PRF_ADDR_ENTRYn.SEQSTAT.SEQ is incremented by 1
modulo 4. The next action is as given in
If the task ends because of a maximum number of retransmissions, a retry TX FIFO command is sent
before the task ends, and PRF_ADDR_ENTRYn.SEQSTAT.SEQ is not incremented. This means that by
default, the packet retransmission is attempted in the next task. If this is not desired, the packet must be
removed from the FIFO. This can be done either by issuing a CMD_TXFIFO_RESET (this also removes
any subsequent packets in the TX FIFO), by reading out the packet using the RFTXFRD register and
issuing a CMD_TX_FIFO_DEALLOC command, or by TX FIFO pointer manipulation
PRF_ADDR_ENTRYn.SEQSTAT.SEQ should then be incremented by one. These operations should only
take place between tasks (that is, while the LLE does not have SEMAPHORE1).
312
CC2541 Proprietary Mode Radio
Length
Counter Incremented
> 0
PRF_ADDR_ENTRYn.N_RXOK
PRF_ADDR_ENTRYn.N_RXIGNORED
= 0
PRF_ADDR_ENTRYn.N_RXNOK
X
Section
25.9.2.3.3.
Copyright © 2009–2014, Texas Instruments Incorporated
Table
25-19. It also shows which of the counters
SWRU191F – April 2009 – Revised April 2014
Submit Documentation Feedback
www.ti.com
Interrupt Raised
RXOK
RXEMPTY
RXNOK
(Section
25.3.1.3).

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents