Radio Control Layer (RCL)
Radio Control Layer (RCL)

Product Overview

The radio control layer (RCL) module provides access to the radio for LPF3 devices. It offers a high-level interface for command execution while also ensuring the lowest possible power consumption by providing automatic power management that is fully transparent to the application.

overall-arch.png
HW/SW Ecosystem

Conceptually, the RCL module can be divided into RCL "High" and RCL "Low". RCL High takes care aspects such as command scheduling and buffer management, while RCL Low takes care of protocol specific operations through command handlers. Finally, to ensure that critical sections are reduced and timing constraints are met, the RCL module uses three different priority interrupts depending on the operation.

For more detailed information about the different components of the Radio Control Layer, see the RCL Architecture page.

Usage

The bare minimum for using the RCL component involves:

  1. Initializing the RCL by calling RCL_init
  2. Initializing an RCL client instance with RCL_open
  3. Declaring an RCL command
  4. Configuring the RCL command
  5. Submitting the RCL command with RCL_Command_submit
  6. Waiting for the command to conclude using RCL_Command_pend or the configured Callback function.
  7. Closing the RCL client and deallocating open resources with RCL_Command_stop.

The following example simple that uses the Generic Tx Test illustrates how the RCL component is used.

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);
}