SWCU191 February 2022 CC1311P3 , CC1311R3 , CC2651P3 , CC2651R3 , CC2651R3SIPA
Before running any radio operation command described in this document, the radio must be set up in IEEE 802.15.4 mode using the command CMD_RADIO_SETUP. Otherwise, the operation ends with an error.
In IEEE 802.15.4 mode, the radio CPU accepts two levels of radio operation commands. Operations can run in the background level or in the foreground level. Each operation can only run in one of these levels. Operations in the foreground level normally require a background-level operation running at the same time.
The background-level operations are the receive and energy detect scan operations. Only one of these can run at a time. The foreground-level operations are the CSMA-CA operation, the receive ACK operation, the transmit operation, the abort background level operation, and the modify radio setup operation. These can be entered as one command or a command chain, even if a background-level operation is running. The CSMA-CA and receive ACK operations run simultaneously with the background-level operation. The transmit operation causes the background level operation to be suspended until the transmission is done. Table 26-81 shows the allowed combinations of background and foreground-level operations. Violation of these combinations causes an error when the foreground-level command is about to start, signaled by the ERROR_WRONG_BG status in the status field of the foreground-level command structure.
Foreground Level Operation | Background Level Operation | ||
---|---|---|---|
None | CMD_IEEE_RX | CMD_IEEE_ED_SCAN | |
None | Allowed | Allowed | Allowed |
CMD_IEEE_TX | Allowed1 | Allowed | Allowed |
CMD_IEEE_CSMA | Forbidden | Allowed | Allowed |
CMD_IEEE_RX_ACK | Forbidden | Allowed | Forbidden |
CMD_IEEE_ABORT_BG | Allowed2 | Allowed | Allowed |
A non-15.4 radio operation may not be run simultaneously with a 15.4 radio operation; if a non-15.4 radio operation is entered while a 15.4 operation is running on either level, scheduling error occurs. Chains of 15.4 and non-15.4 operations can be created, however.
When a foreground-level operation finishes, an FG_COMMAND_DONE interrupt is raised. If the command was the last one in a chain, a LAST_FG_COMMAND_DONE interrupt is raised as well (refer to
Table 26-80). Background-level operations use the common interrupts, COMMAND_DONE and LAST_COMMAND_DONE (see Table 26-80).
The status field of the command structure is updated during the operation. When submitting the command, the system CPU writes this field with a state of IDLE. During the operation, the radio CPU updates the field to indicate the operation mode. When the operation is done, the radio CPU writes a status indicating that the command has finished. Table 26-82 lists the status codes for IEEE 802.15.4 radio operation.
Number | Name | Description |
---|---|---|
Operation Not Finished | ||
0x0000 | IDLE | Operation not started |
0x0001 | PENDING | Waiting for start trigger |
0x0002 | ACTIVE | Running operation |
0x2001 | IEEE_SUSPENDED | Operation suspended |
Normal Operation Ending | ||
0x2400 | IEEE_DONE_OK | Operation ended normally |
0x2401 | IEEE_DONE_BUSY | CSMA-CA operation ended with failure |
0x2402 | IEEE_DONE_STOPPED | Operation stopped after stop command |
0x2403 | IEEE_DONE_ACK | ACK packet received with pending data bit cleared |
0x2404 | IEEE_DONE_ACKPEND | ACK packet received with pending data bit set |
0x2405 | IEEE_DONE_TIMEOUT | Operation ended due to timeout |
0x2406 | IEEE_DONE_BGEND | FG operation ended because necessary background-level operation ended |
0x2407 | IEEE_DONE_ABORT | Operation aborted by command |
Operation Ending With Error | ||
0x0806 | ERROR_WRONG_BG | Foreground level operation is not compatible with running background-level operation |
0x2800 | IEEE_ERROR_PAR | Illegal parameter |
0x2801 | IEEE_ERROR_NO_SETUP | Radio was not set up in IEEE 802.15.4 mode |
0x2802 | IEEE_ERROR_NO_FS | Synthesizer was not programmed when running RX or TX |
0x2803 | IEEE_ERROR_SYNTH_PROG | Synthesizer programming failed |
0x2804 | IEEE_ERROR_RXOVF | RX overflow observed during operation |
0x2805 | IEEE_ERROR_TXUNF | TX underflow observed during operation |
The conditions for giving each status are listed for each operation. Some of the error causes listed in Table 26-82 are not repeated in these lists. In some cases, general error causes described in Section 26.3 may occur. In all of these cases, the result of the operation as defined in Section 26.3 is ABORT.