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 G band.

RAIL_RFSENSE_SUBGHZ

RF Sense is in subgig band.

RAIL_RFSENSE_ANY

RF Sense is in both bands.

RAIL_RFSENSE_MAX
RAIL_RFSENSE_2_4GHZ_LOW_SENSITIVITY

RF Sense is in low sensitivity 2.4 G band.

RAIL_RFSENSE_SUBGHZ_LOW_SENSITIVITY

RF Sense is in low sensitivity subgig band.

RAIL_RFENSE_ANY_LOW_SENSITIVITY

RF Sense is in low sensitivity for both bands.


Definition at line 4675 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 4664 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 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 will be issued).

The EFR32 has 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.

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 chips, RF Sense functionality is only guaranteed within a specified temperature range. See chip-specific documentation for more details.


Definition at line 5263 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

RAIL_RfSenseSelectiveOokConfig_t holds the RFSENSE configuration for Selective(OOK) mode.

Returns

  • Status code indicating success of the function call.

Some chips support Selective RF energy detection (OOK mode) where the user can program the chip to look for a particular sync word pattern (1byte - 4bytes) 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.

// Syncword Length in bytes, 1-4 bytes.
#define NUMSYNCWORDBYTES (2U)
// Syncword Value.
#define SYNCWORD         (0xB16FU)

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

// Configure the receiving node (EFR32XG22) for RF Sense.
RAIL_RfSenseSelectiveOokConfig_t config = {
 .band = rfBand,
 .syncWordNumBytes = NUMSYNCWORDBYTES,
 .syncWord = SYNCWORD,
 .cb = &RAILCb_SensedRf
};
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 5322 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

  • A 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 Syncword (1byte - 4bytes). See chip-specific documentation for more details.


Definition at line 5342 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

Syncword Length in bytes, 1-4 bytes.

[in]syncword

Syncword Value.

Returns

  • A status code indicating success of the function call.

Note


Definition at line 5357 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 5371 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 4669 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 4701 of file common/rail_types.h