This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

what might be the reason(s) falling into TX state when I tried to support packets longer than 256 bytes?

Other Parts Discussed in Thread: CC1101

Hi TI,

Our platform uses CC1101 for the RF communication, and we are able to transmit and receive packets up to 255 bytes successfully. However, when we try to support packets longer than 255 bytes, troubles come out as below:

    - Once we change the packet length config from the "infinite" length mode to the "fixed" length mode by  setting PKTCTRL0.LENGTH_CONFIG from 2 to 0, the statemachine will soon transient from TX state, via PLL setting state, to the RX state, even though the transmission has yet to be completed.

      e.g. we try to transmit 500 bytes, after 500-255=245 bytes has been sent to the 64-byte TXFIFO carefully, we change the packet length config to the fixed length mode. The result is that around 304 bytes could be received successfully by another cc1101 receiver, and the debug indicates that the transitter exits for RX state just upon 304 bytes of transmission. Kindly 304 is just an example and is not keep the same even we try to transmit the same bytes.

 

What might be the reasons here?

For your information:

- The statemachine is configured as "enter to RX state automatically after TX and RX"

- The baud rate is around 100kbps for RF communication

- The distance between the transmitter and receiver is quite small, less than 20cm

- We are following the guideline from the CC1101 datasheet section 15.2.2 "Packet Length > 255".  with some minor change as below

     1.  Set PKTCTRL0.LENGTH_CONFIG=2;

     2.  Set PKTLEN register to packet_length & 0xFF;

     3.  Fill TXFIFO with 1 bytes of destine_addr,  2 bytes of packet data length, and the 1st 61=64-3 bytes of packet data. and strobe STX to send.

     4.  Poll chip status byte periodically.

          Once the statemachine is still in TX and available free TXFIFO is 15 or more bytes(0xF), then write 15 bytes to TXFIFO (note:since the chip stautus byte only indicate an availability of 15 bytes or more, other than 16 bytes or more, if we tried to write 16 bytes here, which sometimes will cause other failures)

          If the remain bytes waiting to sent are less than 256, change the packet length configuration to "fixed" length mode, and wait the completion of transmition.

    5.  Exit upon all bytes are transmitted.

Thanks in advance!