HAL_EnableRFCtrl

Definition: This function is called by the stack to inform HAL which RF path signal is used for TX/RX and, based on the RF front-end design, which respective GPIO pin will be controlled.

Usage of the RFCTRL1 variable:

The RFCtrl1 parameter is used to select the RF output frequency range (or band). The following values are applicable for the parameter.

Note: For more details on the frequency limits and required bands, refer to the SX1276 data sheet.
Table 1. RFCtrl1 Frequency Range and Power

ENUM Value

Frequency Region

TX Power

RFO_LF

< 525 MHz

-4 to +15 dBm

RFO_HF

From 779 MHz

-4 to +15 dBm

PA_BOOST

All frequencies

+2 to +17 dBm

Usage of RFCTRL2 variable:

The RFCtrl2 parameter is used to select either a transmit or receive operation by the transceiver.

Table 2. Master Truth Table for RFCtrl1 and RFCtrl2

RFCtrl1

RFCtrl2

Operation

RFO_LF

TX

  • Transmit operation
  • Transmit Frequency – < 525 MHz
  • Output power – -4 to +15 dBM

RFO_HF

TX

  • Transmit operation
  • Transmit Frequency – >779 MHz
  • Output power – -4 to +15 dBM

PA_BOOST

Do not care

  • Transmit operation
  • Transmit Frequency – All
  • Output power – >15 dBm

RFO_LF

RX

  • Receive Operation
  • Receive Frequency – < 525 MHz

RFO_HF

RX

  • Receive Operation
  • Receive Frequency – > 779 MHz

For the SAM R34 Xplained Pro board or WLR089 Xplained Pro board:

  1. 1.Only RFO_HF and PA_BOOST values of RFCtrl1 are valid and used to set the BAND_SELECT pin. Refer to the SAM R34 Xplained Pro board or WLR089 Xplained Pro board for more details on the front-end RF circuit design.
  2. 2.RFO_LF is not used because neither the SAM R34 Xplained Pro nor WLR089 Xplained Pro supports the frequency operation in < 525 MHz.
  3. 3.The RFCtrl2 input is not used. The SAM R34 Xplained Pro or WLR089 Xplained Pro front-end RF circuit does not need to control based on the TX and RX operation.

Syntax

void HAL_EnableRFCtrl(RFCtrl1_t RFCtrl1, RFCtrl2_t RFCtrl2)
Table 3. Input Parameters

Parameters Name

Parameter Type

Description

RFCtrl1

ENUM

RF Control 1 indicates the FREQUENCY band (Higher UHF or Lower UHF) or PA Boost enabled.
  • RFO_LF = 0
  • RFO_HF = 1
  • PA_BOOST = 2

RFCtrl2

ENUM

RF Control 2 indicates the Transmit or Receive path.

  • RX = 0
  • TX = 1

Return Types and Values

<void>

API Type – Synchronous