English
Language : 

CC2500_06 Datasheet, PDF (28/84 Pages) Texas Instruments – Single Chip Low Cost Low Power RF Transceiver
CC2500
Fixed packet length mode is selected by
setting PKTCTRL0.LENGTH_CONFIG=0. The
desired packet length is set by the PKTLEN
register.
In variable packet length mode,
PKTCTRL0.LENGTH_CONFIG=1, the packet
length is configured by the first byte after the
sync word. The packet length is defined as the
payload data, excluding the length byte and
the optional automatic CRC. The PKTLEN
register is used to set the maximum packet
length allowed in RX. Any packet received with
a length byte with a value greater than
PKTLEN will be discarded.
With PKTCTRL0.LENGTH_CONFIG=2, the
packet length is set to infinite and transmission
and reception will continue until turned off
manually. The infinite mode can be turned off
while a packet is being transmitted or received.
As described in the next section, this can be
used to support packet formats with different
length configuration than natively supported by
CC2500.
15.2.1 Arbitrary Length Field Configuration
The fixed length field can be reprogrammed
during receive and transmit. This opens the
possibility to have a different length field
configuration than supported for variable
length packets. At the start of reception, the
packet length is set to a large value. The MCU
reads out enough bytes to interpret the length
field in the packet. Then the PKTLEN value is
set according to this value. The end of packet
will occur when the byte counter in the packet
handler is equal to the PKTLEN register. Thus,
the MCU must be able to program the correct
length, before the internal counter reaches the
packet length.
By utilizing the infinite packet length option,
arbitrary packet length is available. At the start
of the packet, the infinite mode must be active.
On the TX side, the PKTLEN register is set to
mod(length, 256). On the RX side the
MCU reads out enough bytes to interpret the
length field in the packet and sets the PKTLEN
register to mod(length, 256). When less
than 256 bytes remains of the packet the MCU
disables infinite packet length and activates
fixed length packets. When the internal byte
counter reaches the PKTLEN value, the
transmission or reception ends. Automatic
CRC appending/checking can be used (by
setting PKTCTRL0.CRC_EN to 1).
When for example a 600-byte packet is to be
transmitted, the MCU should do the following
(see also Figure 12):
• Set PKTCTRL0.LENGTH_CONFIG=2 (10).
• Pre-program the PKTLEN register to
mod(600,256)=88.
• Transmit at least 345 bytes, for example
by filling the 64-byte TX FIFO six times
(384 bytes transmitted).
• Set PKTCTRL0.LENGTH_CONFIG=0 (00).
• The transmission ends when the packet
counter reaches 88. A total of 600 bytes
are transmitted.
Internal byte counter in packet handler counts from 0 to 255 and then starts at 0 again
0,1,.......... ,88,.................... 255,0,........,88,.................. ,255,0,........,88,.................. ,255,0,.......................
Infinite packet length enabled
Fixed packet length
enabled when less than
256 bytes remains of
packet
600 bytes transmitted and
received
Length field transmitted and received. Rx and Tx PKTLEN value set to mod(600,256) = 88
Figure 12: Arbitrary length field configuration
PRELIMINARY Data Sheet (Rev.1.2) SWRS040A
Page 28 of 83