SWCU192 November 2021 CC1312R7 , CC1352P7 , CC2652P7 , CC2652R7
The radio CPU allows the user run a set of high-level primitives or commands from the system CPU. After a command is issued through the CMDR register, the radio CPU examines it and decides a course of action.
Three classes of commands are issued:
For the first two classes of commands, CMDR contains a pointer to a command structure. This pointer must be a valid pointer with 32-bit word alignment, so the 2 least significant bits (LSBs) must be 0 0, as shown in Figure 26-3. A direct command is signaled by setting the 2 LSBs to 01 or 10 and placing the command ID number in bits 16 to 31 of CMDR. Bits 8 through 15, or alternatively 2 through 15, may be used as an optional byte parameter. Figure 26-4 shows the format for a direct command.
The data structure pointed to by the CMDR register for radio operation and immediate commands may be in the system RAM or the radio RAM. The system CPU must ensure that the memory area in use is free for access, in particular when using the radio RAM, where a part of the memory is reserved for use by the radio CPU. This information may be obtained with the CMD_GET_FW_INFO command (see Section 26.3.3.2.6). The format of the command follows the structure given in Section 26.3.2.6 and Section 26.3.2.6.1, and they are defined in more detail specifically for each command.
When deciding in which memory area to place data, consider which modules may be powered down:
A radio operation command causes the radio hardware to be accessed. Radio operation commands can do operations such as transmitting or receiving a packet, setting up radio hardware registers, or doing more complex, protocol-dependent operations. A radio operation command can normally be issued only while the radio is idle.
An immediate command is a command to change or request status of the radio, or to manipulate TX or RX data queues. An intermediate command can monitor status such as received signal strength. An immediate command can be issued at any time, but the response is, in many cases, only of interest while a radio operation is ongoing.
A direct command is an immediate command with no parameters, or in some cases, a direct command has 1- or 2-byte parameters. A direct command is issued by sending a value to the CMDR register with the format of Figure 26-4. The 16 most significant bits (MSBs) contain the command ID of the immediate command to run. Bits 8 through 15 or bits 2 through 15 may contain an optional parameter if specified for the command.