SWCU191 February 2022 CC1311P3 , CC1311R3 , CC2651P3 , CC2651R3 , CC2651R3SIPA
The bootloader uses well-defined packets to ensure reliable communications with the external communicating program. All communications (with the exception of the UART automatic baud [see Section 11.2.2.1]) use these well-defined packets. The packets are always acknowledged or not acknowledged by the communicating devices with defined ACK or NACK bytes.
The packets use the same format for receiving and sending packets. This format includes the method to acknowledge successful or unsuccessful reception of a packet.
While the actual signaling on the serial ports is different, the packet format remains the same for supported UART and SSI interfaces.
Packet send and packet receive must adhere to the simple protocol shown in Figure 11-1.
Perform the following steps to successfully send a packet:
Perform the following steps to successfully receive a packet:
Acknowledge (ACK) bytes are sent out whenever a packet is successfully received and verified by the receiver. A not-acknowledge (NAK) byte is sent out whenever a sent packet is detected to have an error, usually as a result of a checksum error or just malformed data in the packet, which allows the sender to retransmit the previous packet.
To illustrate packet handling, the basic packet format is shown in Figure 11-2.
In Figure 11-2, the top line shows the device that is transmitting data; the bottom line is the response from the other device.
In this case, a 6-byte packet is sent with the data shown in Figure 11-2. This data results in a checksum of 0x48+0x6f+0x6c+0x61 which, when truncated to 8 bits, is 0x84. The first byte transmitted holds the size of the packet in number of bytes. Then the checksum byte is transmitted. The next bytes to go out are the 4 data bytes in this packet. The transmitter is allowed to send zeros until a nonzero response is received, that is necessary for SSI and is allowed by the UART. The receiver is allowed to return zeros until it is ready to ACK or NAK the packet that is being sent. Neither device transfers a nonzero byte until it has received a response after transmitting a packet.