RF Sense#

Modules#

RAIL_RfSenseSelectiveOokConfig_t

Enumerations#

enum
RAIL_RFSENSE_OFF
RAIL_RFSENSE_2_4GHZ
RAIL_RFSENSE_SUBGHZ
RAIL_RFSENSE_ANY
RAIL_RFSENSE_MAX
RAIL_RFSENSE_2_4GHZ_LOW_SENSITIVITY = (0x20U) + RAIL_RFSENSE_2_4GHZ
RAIL_RFSENSE_SUBGHZ_LOW_SENSITIVITY = (0x20U) + RAIL_RFSENSE_SUBGHZ
RAIL_RFENSE_ANY_LOW_SENSITIVITY = (0x20U) + RAIL_RFSENSE_ANY
}

An enumeration for specifying the RF Sense frequency band.

Typedefs#

typedef void(*

A pointer to an RF Sense callback function.

Functions#

RAIL_StartRfSense(RAIL_Handle_t railHandle, RAIL_RfSenseBand_t band, RAIL_Time_t senseTime, RAIL_RfSense_CallbackPtr_t cb)

Start/stop the RF Sense functionality in Energy Detection Mode for use during low-energy sleep modes.

RAIL_StartSelectiveOokRfSense(RAIL_Handle_t railHandle, RAIL_RfSenseSelectiveOokConfig_t *config)

Start/stop the RF Sense functionality in Selective(OOK Based) Mode for use during low-energy sleep modes.

RAIL_ConfigRfSenseSelectiveOokWakeupPhy(RAIL_Handle_t railHandle)

Switch to RF Sense Selective(OOK) PHY.

RAIL_SetRfSenseSelectiveOokWakeupPayload(RAIL_Handle_t railHandle, uint8_t numSyncwordBytes, uint32_t syncword)

Set the transmit payload for waking up a node configured for RF Sense Selective(OOK).

bool
RAIL_IsRfSensed(RAIL_Handle_t railHandle)

Check whether the RF was sensed.

Macros#

#define

RF Sense low sensitivity offset.

#define

Use the MODEM default sync word.

Enumeration Documentation#

RAIL_RfSenseBand_t#

RAIL_RfSenseBand_t

An enumeration for specifying the RF Sense frequency band.

Enumerator
RAIL_RFSENSE_OFF

RF Sense is disabled.

RAIL_RFSENSE_2_4GHZ

RF Sense is in 2.4 GHz band.

RAIL_RFSENSE_SUBGHZ

RF Sense is in Sub-GHz band.

RAIL_RFSENSE_ANY

RF Sense is in both bands.

RAIL_RFSENSE_MAX

A count of the basic choices in this enumeration.

RAIL_RFSENSE_2_4GHZ_LOW_SENSITIVITY

RF Sense is in low sensitivity 2.4 GHz band.

RAIL_RFSENSE_SUBGHZ_LOW_SENSITIVITY

RF Sense is in low sensitivity Sub-GHz band.

RAIL_RFENSE_ANY_LOW_SENSITIVITY

RF Sense is in low sensitivity for both bands.


Definition at line 4823 of file common/rail_types.h

Typedef Documentation#

RAIL_RfSense_CallbackPtr_t#

typedef void(* RAIL_RfSense_CallbackPtr_t) (void) )(void)

A pointer to an RF Sense callback function.

Consider using the event RAIL_EVENT_RF_SENSED as an alternative.


Definition at line 4812 of file common/rail_types.h

Function Documentation#

RAIL_StartRfSense#

RAIL_Time_t RAIL_StartRfSense (RAIL_Handle_t railHandle, RAIL_RfSenseBand_t band, RAIL_Time_t senseTime, RAIL_RfSense_CallbackPtr_t cb)

Start/stop the RF Sense functionality in Energy Detection Mode for use during low-energy sleep modes.

Parameters
[in]railHandle

A RAIL instance handle.

[in]band

The frequency band(s) on which to sense the RF energy. To stop RF Sense, specify RAIL_RFSENSE_OFF.

[in]senseTime

The time (in microseconds) the RF energy must be continually detected to be considered "sensed".

[in]cb

RAIL_RfSense_CallbackPtr_t is called when the RF is sensed. Set NULL if using RAIL_EVENT_RF_SENSED or polling via RAIL_IsRfSensed().

Returns

  • The actual senseTime used, which may be different than requested due to limitations of the hardware. If 0, RF sense was disabled or could not be enabled (no callback or event will be issued).

Some EFR32 radios have the ability to sense the presence of RF energy above -20 dBm within either or both the 2.4 GHz and Sub-GHz bands and trigger an event if that energy is continuously present for certain durations of time. An application can check when RF energy is sensed either by enabling the event RAIL_EVENT_RF_SENSED, by polling on the RAIL_IsRfSensed() API, or by using the cb callback.

Note

  • After RF energy has been sensed, the RF Sense is automatically disabled and RAIL_StartRfSense() must be called again to reactivate it. If RF energy has not been sensed and to manually disable RF Sense, RAIL_StartRfSense() must be called with band specified as RAIL_RFSENSE_OFF or with senseTime set to 0 microseconds.

  • Packet reception is not guaranteed to work correctly once RF Sense is enabled, both in single protocol and multiprotocol RAIL. To be safe, an application should turn this on only after idling the radio to stop receive and turn it off before attempting to restart receive. Since EM4 sleep causes the chip to come up through the reset vector any wake from EM4 must also shut off RF Sense to ensure proper receive functionality.

Warnings

  • For some radios, RF Sense functionality is only guaranteed within a specified temperature range. See chip-specific documentation for more details.


Definition at line 5378 of file common/rail.h

RAIL_StartSelectiveOokRfSense#

RAIL_Status_t RAIL_StartSelectiveOokRfSense (RAIL_Handle_t railHandle, RAIL_RfSenseSelectiveOokConfig_t * config)

Start/stop the RF Sense functionality in Selective(OOK Based) Mode for use during low-energy sleep modes.

Parameters
[in]railHandle

A RAIL instance handle.

[in]config

A pointer to a RAIL_RfSenseSelectiveOokConfig_t which holds the RFSENSE configuration for Selective(OOK) mode.

Returns

  • Status code indicating success of the function call.

Some radios support Selective RF energy detection (OOK mode) where the user can program the radio to look for a particular sync word pattern (1-4 bytes) sent using OOK and wake only when that is detected. See chip-specific documentation for more details.

The following code gives an example of how to use RF Sense functionality in Selective(OOK Based) Mode.

// Sync word length in bytes, 1-4 bytes.
#define NUM_SYNC_WORD_BYTES (2U)
// Sync word value.
#define SYNC_WORD           (0xB16FU)
// Desired RF band
RAIL_RfSenseBand_t rfBand = RAIL_RFSENSE_2_4GHZ;

// Configure the transmitting node for sending the wakeup packet.
RAIL_Idle(railHandle, RAIL_IDLE_ABORT, true);
RAIL_ConfigRfSenseSelectiveOokWakeupPhy(railHandle);
RAIL_SetRfSenseSelectiveOokWakeupPayload(railHandle, NUM_SYNC_WORD_BYTES, SYNC_WORD);
RAIL_StartTx(railHandle, channel, RAIL_TX_OPTIONS_DEFAULT, NULL);

// Configure the receiving node (EFR32xG22) for RF Sense.
RAIL_RfSenseSelectiveOokConfig_t config = {
 .band = rfBand,
 .syncWordNumBytes = NUM_SYNC_WORD_BYTES,
 .syncWord = SYNC_WORD,
 .cb = NULL // Use RAIL_EVENT_RF_SENSED event or poll RAIL_IsRfSensed()
};
RAIL_StartSelectiveOokRfSense(railHandle, &config);

Note

  • After RF energy has been sensed, the RF Sense is automatically disabled and RAIL_StartSelectiveOokRfSense() must be called again to reactivate. If RF energy has not been sensed and to manually disable RF Sense, RAIL_StartSelectiveOokRfSense() must be called with band specified as RAIL_RFSENSE_OFF or with RAIL_RfSenseSelectiveOokConfig_t as NULL.

  • Packet reception is not guaranteed to work correctly once RF Sense is enabled, both in single protocol and multiprotocol RAIL. To be safe, an application should turn this on only after idling the radio to stop receive and turn it off before attempting to restart receive. Since EM4 sleep causes the chip to come up through the reset vector any wake from EM4 must also shut off RF Sense to ensure proper receive functionality.


Definition at line 5437 of file common/rail.h

RAIL_ConfigRfSenseSelectiveOokWakeupPhy#

RAIL_Status_t RAIL_ConfigRfSenseSelectiveOokWakeupPhy (RAIL_Handle_t railHandle)

Switch to RF Sense Selective(OOK) PHY.

Parameters
[in]railHandle

A handle for RAIL instance.

Returns

  • Status code indicating success of the function call.

This function switches to the RFSENSE Selective(OOK) PHY for transmitting a packet to wake up a chip that supports Selective RF energy detection (OOK mode). You may only call this function while the radio is idle. While the radio is configured for this PHY, receive functionality should not be used.

Note

  • The user must also set up the transmit FIFO, via RAIL_SetRfSenseSelectiveOokWakeupPayload, post this function call to include the first byte as the Preamble byte, followed by the Sync word (1-4 bytes). See chip-specific documentation for more details.


Definition at line 5457 of file common/rail.h

RAIL_SetRfSenseSelectiveOokWakeupPayload#

RAIL_Status_t RAIL_SetRfSenseSelectiveOokWakeupPayload (RAIL_Handle_t railHandle, uint8_t numSyncwordBytes, uint32_t syncword)

Set the transmit payload for waking up a node configured for RF Sense Selective(OOK).

Parameters
[in]railHandle

A handle for RAIL instance.

[in]numSyncwordBytes

Sync word length in bytes, 1-4 bytes.

[in]syncword

Sync word value.

Returns

  • Status code indicating success of the function call.

Note


Definition at line 5471 of file common/rail.h

RAIL_IsRfSensed#

bool RAIL_IsRfSensed (RAIL_Handle_t railHandle)

Check whether the RF was sensed.

Parameters
[in]railHandle

A RAIL instance handle.

Returns

This function is useful if RAIL_StartRfSense() is called with a NULL callback. It is generally used after EM4 reboot but can be used any time.


Definition at line 5485 of file common/rail.h

Macro Definition Documentation#

RAIL_RFSENSE_LOW_SENSITIVITY_OFFSET#

#define RAIL_RFSENSE_LOW_SENSITIVITY_OFFSET
Value:
(0x20U)

RF Sense low sensitivity offset.


Definition at line 4817 of file common/rail_types.h

RAIL_RFSENSE_USE_HW_SYNCWORD#

#define RAIL_RFSENSE_USE_HW_SYNCWORD
Value:
(0U)

Use the MODEM default sync word.


Definition at line 4861 of file common/rail_types.h