Radio Control Layer (RCL)
IEEE 802.15.4 Tx Test Command Handler

Introduction

The IEEE Tx Test command allows to continuously transmit a modulated signal or Continuous Wave (CW), which is useful when characterizing a PHY or testing against an instrument. The following sections describe how the command can be configured and used, its life cycle, and how it fits into the RCL architecture.

In order to submit a Generic Tx Test command, the following steps must have taken place:

  1. RCL has been initialized (See RCL_init) and a handle must exist (See RCL_open).
  2. The RCL_CMD_GENERIC_TX_TEST_t command has been initialized and configured.
  3. The command has been configured according to the needs of the user.

Once these steps have been completed, RCL_Command_submit and RCL_Command_pend are called to effectively send and then wait for the command to conclude. Once this has happened, the callback and the command status can be used for error checking and the application can proceed according to its specification.

Usage

The IEEE Tx Test command is normally employed when the user wants to do Tx testing (for example CW tests). For this reason, the application needs to define not only the type of test signal to be used, but also the stop conditions.

Since no actual packet is meant to be transmitted with this command, there is no need to set up and configure a Tx buffer. The following code snippet shows a normal use-case for the command.

void runIeeeTxTest(void)
{
/* Open client with the IEEE 802.15.4 setup. Note that declaring the handle here means that the function is not
allowed to return until the handle has been closed */
RCL_Handle handle = RCL_open(&rclClient, &LRF_configIeee802154);
/* Declare command. Note that declaring the command here means that the function
can't return until the command is finished */
RCL_CmdIeeeTxTest cmd;
/* Initialize the command with default parameters */
/* Command configuration */
cmd.common.scheduling = RCL_Schedule_Now;
cmd.common.timing.relHardStopTime = RCL_SCHEDULER_SYSTIM_US(5000); // Stop continuous wave after 5000 [us]
cmd.rfFrequency = CW_FREQUENCY;
cmd.config.sendCw = 1; // Send continuous wave
cmd.config.whitenMode = 0; // No whitening
cmd.txWord = 0;
cmd.common.status = RCL_CommandStatus_Idle;
/* Start command */
RCL_Command_submit(handle, &cmd);
/* Wait for command to conclude */
RCL_close(handle);
}

Architecture

The IEEE Tx Test command handler has a life cycle that corresponds to the duration of the transmission. Since the transmission is continuous, there is no implicit stop time. The duration of the command needs to be set up with a hard stop time, or the application needs to explicitly stop the transmission using the RCL_Command_stop API.

IEEE Tx Test handler state machine

Events

The following tables list the events handled.

RCL Event (In) Description
RCL_EventSetup Setup has been performed
RCL_EventTimerStart Timer-based start signalled
RCL Event (Out) Description
RCL_EventCmdStarted Command handler has accepted and started executing
RCL_EventLastCmdDone The RCL is finished with the command
LRF Event Description
LRF_EventOpDone The PBE operation has finished
LRF_EventOpError The PBE operation has finished with error or hard stop