5. Receiver Control Command

Configures receiver bandwidth, low-noise amplifier (LNA) gain, received signal strength indicator (RSSI) threshold, valid data indicator (VDI) behavior, and the function of pin 16.

Register Fields

Bits

Name

Meaning

API

10

p16

Pin 16 function

rfm12_set_pin16_function()

9:8

d1:d0

VDI response mode

rfm12_set_vdi_mode()

7:5

i2:i0

Receiver baseband bandwidth

rfm12_set_rx_bandwidth()

4:3

g1:g0

LNA gain

rfm12_set_lna_gain()

2:0

r2:r0

RSSI detector threshold

rfm12_set_rssi_threshold()

The functions listed in the register field table above directly configure fields in the Receiver Control Command. The setters and reset function update staged configuration without communicating with the radio. Use rfm12_apply_to_radio() to write the staged settings.

Command Functions

rfm12_set_pin16_function()

RFM12_result_t rfm12_set_pin16_function(RFM12_t *dev, RFM12_pin16_function_t pin16)

Stage the function of pin 16.

Select RFM12_PIN16_INTERRUPT_IN for the external interrupt input or RFM12_PIN16_VDI_OUT for the valid data indicator output.

Parameters:
  • dev – RFM12 radio instance.

  • pin16 – Pin 16 function to select.

Returns:

RFM12_OK on success, or an appropriate RFM12_result_t error.

rfm12_set_vdi_mode()

RFM12_result_t rfm12_set_vdi_mode(RFM12_t *dev, RFM12_vdi_mode_t mode)

Stage the valid data indicator response mode.

Select RFM12_VDI_FAST, RFM12_VDI_MEDIUM, RFM12_VDI_SLOW, or RFM12_VDI_ALWAYS. The always-on mode holds VDI high independently of the receiving parameters.

Parameters:
  • dev – RFM12 radio instance.

  • mode – VDI response mode to select.

Returns:

RFM12_OK on success, or an appropriate RFM12_result_t error.

rfm12_set_rx_bandwidth()

RFM12_result_t rfm12_set_rx_bandwidth(RFM12_t *dev, RFM12_rx_bandwidth_t bandwidth)

Stage the receiver baseband bandwidth.

Select RFM12_RX_BANDWIDTH_400_KHZ, RFM12_RX_BANDWIDTH_340_KHZ, RFM12_RX_BANDWIDTH_270_KHZ, RFM12_RX_BANDWIDTH_200_KHZ, RFM12_RX_BANDWIDTH_134_KHZ, or RFM12_RX_BANDWIDTH_67_KHZ.

Parameters:
  • dev – RFM12 radio instance.

  • bandwidth – Receiver bandwidth selection.

Returns:

RFM12_OK on success, or an appropriate RFM12_result_t error.

rfm12_set_lna_gain()

RFM12_result_t rfm12_set_lna_gain(RFM12_t *dev, RFM12_lna_gain_t gain)

Stage the low-noise amplifier gain relative to its maximum gain.

Select RFM12_LNA_GAIN_0_DB, RFM12_LNA_GAIN_M6_DB, RFM12_LNA_GAIN_M14_DB, or RFM12_LNA_GAIN_M20_DB for 0, -6, -14, or -20 dB respectively. The LNA gain also affects the effective RSSI threshold configured by rfm12_set_rssi_threshold().

Parameters:
  • dev – RFM12 radio instance.

  • gain – LNA gain selection.

Returns:

RFM12_OK on success, or an appropriate RFM12_result_t error.

rfm12_set_rssi_threshold()

RFM12_result_t rfm12_set_rssi_threshold(RFM12_t *dev, RFM12_rssi_threshold_t threshold)

Stage the RSSI detector threshold setting.

Select RFM12_RSSI_THRESHOLD_M103_DBM, RFM12_RSSI_THRESHOLD_M97_DBM, RFM12_RSSI_THRESHOLD_M91_DBM, RFM12_RSSI_THRESHOLD_M85_DBM, RFM12_RSSI_THRESHOLD_M79_DBM, or RFM12_RSSI_THRESHOLD_M73_DBM.

The effective RSSI threshold depends on the LNA gain. The datasheet expresses this relationship as RSSI_th = RSSI_setth + G_LNA.

Parameters:
  • dev – RFM12 radio instance.

  • threshold – RSSI detector threshold selection.

Returns:

RFM12_OK on success, or an appropriate RFM12_result_t error.

rfm12_reset_receiver_control()

RFM12_result_t rfm12_reset_receiver_control(RFM12_t *dev)

Reset the staged Receiver Control Command values to their defaults.

This function does not communicate with the radio. The changed settings are written to the radio by rfm12_apply_to_radio().

Parameters:
  • dev – RFM12 radio instance.

Returns:

RFM12_OK on success, or an appropriate RFM12_result_t error.