
CC112X/CC1175
SWRU295C
Page 44 of 108
7.1.4
Arbitrary Length Field Configuration
, can be reprogrammed during receive and transmit (this is also
register). In combination with fixed
packet length mode (
) this opens the possibility to have a
different length field configuration than supported for variable length packets (in variable packet length
mode the length byte is the first byte after the sync word). 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
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
register. Thus, the MCU must be able to
program the correct length before the internal counter reaches the packet length.
7.1.5
Packet Length > 255
can also be reprogrammed during TX and RX. This opens the
possibility to transmit and receive packets that are longer than 256 bytes and still be able to use the
packet handling hardware support. At the start of the packet, the infinite packet length mode
(
PKT_CFG0.LENGTH_CONFIG = 10b
) must be active. On the TX side, the
register is set
to mod(length, 256)
.
On the RX side the MCU reads out enough bytes to interpret the length field in
register to mod(length, 256)
13
.
When less than 256 bytes remains
of the packet, the MCU disables infinite packet length mode and activates fixed packet length mode
(
). When the internal byte counter reaches the
value,
the
transmission
or
reception
ends
(the
radio
enters
the
state
determined
by
. Automatic CRC appending/checking
can also be used (by setting
PKT_CFG1.CRC_CFG = 01 or 10b
).
When for example a 600-byte packet is to be transmitted, the MCU should do the following.
Set
Pre-program the
register to mod(600, 256) = 88
Transmit at least 345 bytes (600
− 255), for example by filling the 128-byte TX FIFO three times
(384 bytes transmitted)
Set
The transmission ends when the packet counter reaches 88. A total of 600 bytes are transmitted.
13
Given two positive numbers, a dividend
x
and a divisor
y
, mod(
x
,
y
) can be thought of as the
remainder when dividing
x
by
y
. For instance, the expression mod(5, 4) would evaluate to 1 because
5 divided by 4 leaves a remainder of 1.
Figure 17: Packet Length > 255
0
,
1
,
..........
,
88
,
....................
255
,
0
,
........
,
88
,
..................
,
255
,
0
,
........
,
88
,
..................
,
255
,
0
,
.......................
Internal byte counter in packet handler counts from 0 to 255 and then starts from 0 again
Length field transmitted and received
RX and TX PKT_LEN value set to mod(600, 256) = 88)
Infinite packet length enabled
Fixed packet length
enabled when less than 256
bytes remains of the packet
600 bytes transmitted
or received