SWCU194 March 2023 CC1314R10 , CC1354P10 , CC1354R10 , CC2674P10 , CC2674R10
The test packet transmitter command may be used to transmit physical layer test packets.
A test packet transmitter operation is started by a CMD_BLE_TX_TEST or CMD_BLE5_TX_TEST command. In the command structure, it shall have a pParams parameter of the type defined in Table 26-100 and a pOutput parameter of the type defined in Table 26-113. At the start of a test TX operation, the radio CPU shall wait for the start trigger. It shall then program the frequency based on the channel parameter of the command structure. For CMD_BLE5_TX_TEST, it shall also set up the PHY mode given in phyMode.mainMode. The radio CPU shall set up the test packet synchronization word (see the Bluetooth® Specification documents listed in Related Documentation) and use the CRC initialization value 0x555555. The whitener shall be set up as defined in the whitening parameter. To produce PHY test packets conforming to the Specification of the Bluetooth® System, Version 5.0 document listed in Related Documentation), the whitener should be disabled.
The radio CPU shall transmit pParams->numPackets packets and then end the operation. If pParams->numPackets is 0, transmission shall continue until the operation ends for another reason (timeout, stop, or abort command). The time (number of radio timer ticks) between the start of each packet shall be given by pParams->period. If this time is smaller than the duration of a packet, each packet shall be transmitted as soon as possible. Each packet shall be assembled as follows by the radio CPU. The first byte is a header byte. It shall contain the value of pParams->packetType, provided this one of the values listed in Table 26-163. The next byte is the length byte, which shall be the value of pParams->payloadLength. This shall be followed by a number of payload bytes that shall be as listed in Table 26-163. The number of payload bytes shall be equal to pParams->payloadLength. If pParams->packetType is 0, the bytes shall be from the PRBS9 sequence defined in Specification of the Bluetooth® System documents listed in Related Documentation. Otherwise, all the bytes shall be the same, as listed in Table 26-163. A 3-byte CRC, according to the Bluetooth® low energy specification listed in Related Documentation, shall be appended.
Value of packetType | Transmitted Bytes |
---|---|
0 | PRBS9 sequence |
1 | Repeated 0x0F |
2 | Repeated 0x55 |
3 | PRBS15 sequence |
4 | Repeated 0xFF |
5 | Repeated 0x00 |
6 | Repeated 0xF0 |
7 | Repeated 0xAA |
The PRBS15 payload type defined in the Bluetooth® Specification documents listed in Related Documentation, which corresponds to payload type 3, shall be implemented using the polynomial x15 + x14 + 1. The initialization shall be taken from the radio timer for the first packet transmitted and not re-initialized for subsequent packets.
If pParams->config.overrideDefault is 1, the packet shall be nonstandard. The header shall contain the value given in pParams->packetType, and each byte transmitted shall be as given in pParams->byteVal. If pParams->config.bUsePrbs9 is 1, the sequence shall be generated through an XOR operation where each byte of the PRBS9 sequence used for packet type 0 with pParams->byteVal. If pParams->config.bUsePrbs15 is 1, the sequence shall be generated through an XOR operation where each byte of the PRBS15 sequence used for packet type 3 with pParams->byteVal.
If either of the PRBS sequences is used, whitening will be disabled regardless of the setting in the whitening parameter.
A trigger to end the operation is set up by pParams->endTrigger and pParams->endTime. If the trigger that is defined by this parameter occurs, the radio operation shall end as soon as possible. If it occurs while waiting between packets, the operation shall end immediately. If it occurs at another time, the operation shall continue until the current packet is fully transmitted, and then end. If the immediate command CMD_STOP (see Section 26.3.3.2.2) is received by the radio CPU, it shall have the same meaning as the end trigger occurring, except that the status code after ending shall be CMD_DONE_STOPPED.
The output structure pOutput contains only the field nTx. The nTx field shall be incremented each time a packet is transmitted. The radio CPU shall not initialize the field, so this must be done by the system CPU when a reset of the counters is desired. A Tx_Done interrupt shall be raised each time a packet is transmitted.
A PHY test TX operation will end with one of the statuses listed in Table 26-164. The status field of the command structure after the operation is ended indicates the reason why the operation ended. In all cases, a Command_Done interrupt is raised. In each case, the result of TRUE, FALSE, or ABORT is indicated, which will decide the next action, as defined in Section 26.3.3.2.2.
Condition | Status Code | Result |
---|---|---|
Transmitted pParams->numPackets packets | BLE_DONE_OK | TRUE |
Observed trigger indicated by pParams->endTrigger while waiting between packets | BLE_DONE_ENDED | FALSE |
Observed trigger indicated by pParams->endTrigger, then finished transmitting packet | BLE_DONE_ENDED | FALSE |
Observed CMD_STOP while waiting between packets | BLE_DONE_STOPPED | FALSE |
Observed CMD_STOP, then finished transmitting packet | BLE_DONE_STOPPED | FALSE |
Received CMD_ABORT | BLE_DONE_ABORT | ABORT |
Illegal value of channel | BLE_ERROR_PAR | ABORT |
Illegal value of pParams->packetType | BLE_ERROR_PAR | ABORT |