12.07.2015 Views

Single-Chip Low Cost Low Power RF-Transceiver (Rev. A)

Single-Chip Low Cost Low Power RF-Transceiver (Rev. A)

Single-Chip Low Cost Low Power RF-Transceiver (Rev. A)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CC2500Fixed packet length mode is selected bysetting PKTCTRL0.LENGTH_CONFIG=0. Thedesired packet length is set by the PKTLENregister.In variable packet length mode,PKTCTRL0.LENGTH_CONFIG=1, the packetlength is configured by the first byte after thesync word. The packet length is defined as thepayload data, excluding the length byte andthe optional automatic CRC. The PKTLENregister is used to set the maximum packetlength allowed in RX. Any packet received witha length byte with a value greater thanPKTLEN will be discarded.With PKTCTRL0.LENGTH_CONFIG=2, thepacket length is set to infinite and transmissionand reception will continue until turned offmanually. The infinite mode can be turned offwhile a packet is being transmitted or received.As described in the next section, this can beused to support packet formats with differentlength configuration than natively supported byCC2500.15.2.1 Arbitrary Length Field ConfigurationThe fixed length field can be reprogrammedduring receive and transmit. This opens thepossibility to have a different length fieldconfiguration than supported for variablelength packets. At the start of reception, thepacket length is set to a large value. The MCUreads out enough bytes to interpret the lengthfield in the packet. Then the PKTLEN value isset according to this value. The end of packetwill occur when the byte counter in the packethandler is equal to the PKTLEN register. Thus,the MCU must be able to program the correctlength, before the internal counter reaches thepacket length.By utilizing the infinite packet length option,arbitrary packet length is available. At the startof the packet, the infinite mode must be active.On the TX side, the PKTLEN register is set tomod(length, 256). On the RX side theMCU reads out enough bytes to interpret thelength field in the packet and sets the PKTLENregister to mod(length, 256). When lessthan 256 bytes remains of the packet the MCUdisables infinite packet length and activatesfixed length packets. When the internal bytecounter reaches the PKTLEN value, thetransmission or reception ends. AutomaticCRC appending/checking can be used (bysetting PKTCTRL0.CRC_EN to 1).When for example a 600-byte packet is to betransmitted, the MCU should do the following(see also Figure 12):• Set PKTCTRL0.LENGTH_CONFIG=2 (10).• Pre-program the PKTLEN register tomod(600,256)=88.• Transmit at least 345 bytes, for exampleby filling the 64-byte TX FIFO six times(384 bytes transmitted).• Set PKTCTRL0.LENGTH_CONFIG=0 (00).• The transmission ends when the packetcounter reaches 88. A total of 600 bytesare transmitted.Internal byte counter in packet handler counts from 0 to 255 and then starts at 0 again0,1,..........,88,....................255,0,........,88,..................,255,0,........,88,..................,255,0,.......................Infinite packet length enabledFixed packet lengthenabled when less than256 bytes remains ofpacketLength field transmitted and received. Rx and Tx PKTLEN value set to mod(600,256) = 88Figure 12: Arbitrary length field configuration600 bytes transmitted andreceivedPRELIMINARY Data Sheet (<strong>Rev</strong>.1.2) SWRS040A Page 28 of 83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!