SWCU191 February 2022 CC1311P3 , CC1311R3 , CC2651P3 , CC2651R3 , CC2651R3SIPA
Command ID number: 0x0813
CMD_PATTERN_CHECK is a radio operation command. In addition to the parameters listed in
Table 26-9, the command structure contains the fields listed in Table 26-36.
Byte Index | Field Name | Bits | Bit Field Name | Type | Description |
---|---|---|---|---|---|
14–15 | patternOpt | 0–1 | operation | W | Operation to perform: 0: TRUE if value == compareVal 1: TRUE if value < compareVal 2: TRUE if value > compareVal 3: Reserved |
2 | bByteRev | W | If 1, interchange the 4 bytes of the value, so that they are read MSB first. | ||
3 | bBitRev | W | If 1, perform bit reversal of the value. | ||
4–8 | signExtend | W | 0: Treat value and compareVal as unsigned. 1–31: Treat value and compareVal as signed, where the value gives the number of the MSB in the signed number. | ||
9 | bRxVal | W | 0: Use pValue as a pointer. 1: Use pValue as a signed offset to the start of the last committed RX entry element. | ||
16–19 | pNextOpIfOk | W | Pointer to next operation if comparison result was TRUE | ||
20–23 | pValue | W | Pointer from which to read, or offset from last RX entry if patternOpt.bRxVal == 1 | ||
24–27 | mask | W | Bit mask to apply before comparison | ||
28–31 | compareVal | W | Value to which to compare |
When starting, the radio CPU reads a 4-byte value from the location pointed to by pValue if
patternOpt.bRxVal == 0. If patternOpt.bRxVal == 1, the location to read from is found by taking the pointer to the start of the last committed RX entry element and adding the signed number found in pValue as a byte offset. In either case, this pointer does not need to be 4-byte-aligned. If the pointer is not byte-aligned, the value is read byte by byte.
The value is then subject to the following operations in this order:
If patternOpt.operation or pValue have illegal values, the operation ends with a status of ERROR_PAR. Otherwise, the operation ends by one of the causes listed in Table 26-14 or Table 26-37, depending on the result of the comparison in Step 5 in the previous list. If the comparison result was TRUE, the next radio operation command to run is given by pNextOpIfOk instead of pNextOp.
Condition | Status Code | Result |
---|---|---|
Comparison result was TRUE. | DONE_OK | TRUE |
Comparison result was FALSE. | DONE_FAILED | FALSE |
Command run with patternOpt.bRxVal when no RX data is fully received | ERROR_NO_RX | ABORT |