Radio Control Layer (RCL)
Generic Tx Test Command Handler

Introduction

The generic 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 Generic 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 runGenericTxTest(void)
{
RCL_Handle handle = RCL_open(&rclClient, &LRF_configGfsk500Kbps);
/* Declare command */
RCL_CmdGenericTxTest cmd;
/* Command configuration */
cmd.common.scheduling = RCL_Schedule_Now;
cmd.common.runtime.callback = defaultCallback;
cmd.common.runtime.rclCallbackMask.value = RCL_EventLastCmdDone.value | RCL_EventCmdStarted.value;
cmd.common.timing.relHardStopTime = RCL_SCHEDULER_SYSTIM_US(5000); // Stop continuous wave after 5000 [us]
cmd.rfFrequency = FREQUENCY;
cmd.config.sendCw = 1; // Send continuous wave
cmd.config.whitenMode = 1; // Default whitening
cmd.config.txWord = 0;
cmd.common.status = RCL_CommandStatus_Idle;
RCL_Command_submit(handle, &cmd);
/* Wait for command to conclude */
RCL_close(handle);
}

Architecture

The Generic 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.

Generic Tx Test handler state machine
RCL Event (In) Description
setup Setup has been performed
timerStart Timer-based start signalled
RCL Event (Out) Description
lastCmdDone The RCL is finished with the command
cmdStarted Command handler has accepted and started executing
LRF Event Description
opDone The PBE operation has finished
opError Something went wrong. Cause located in the PBE ENDCAUSE register