nRF5 SDK for Thread and Zigbee v1.0.0
Choose documentation:
RADIO HAL

Hardware access layer for managing the radio (RADIO). More...

Macros

#define NRF_RADIO_TASK_SET   (1UL)
 
#define NRF_RADIO_EVENT_CLEAR   (0UL)
 

Enumerations

enum  nrf_radio_task_t {
  NRF_RADIO_TASK_TXEN = offsetof(NRF_RADIO_Type, TASKS_TXEN), NRF_RADIO_TASK_RXEN = offsetof(NRF_RADIO_Type, TASKS_RXEN), NRF_RADIO_TASK_START = offsetof(NRF_RADIO_Type, TASKS_START), NRF_RADIO_TASK_STOP = offsetof(NRF_RADIO_Type, TASKS_STOP),
  NRF_RADIO_TASK_DISABLE = offsetof(NRF_RADIO_Type, TASKS_DISABLE), NRF_RADIO_TASK_CCASTART = offsetof(NRF_RADIO_Type, TASKS_CCASTART), NRF_RADIO_TASK_CCASTOP = offsetof(NRF_RADIO_Type, TASKS_CCASTOP), NRF_RADIO_TASK_EDSTART = offsetof(NRF_RADIO_Type, TASKS_EDSTART),
  NRF_RADIO_TASK_EDSTOP = offsetof(NRF_RADIO_Type, TASKS_EDSTOP), NRF_RADIO_TASK_RSSISTART = offsetof(NRF_RADIO_Type, TASKS_RSSISTART)
}
 RADIO tasks. More...
 
enum  nrf_radio_event_t {
  NRF_RADIO_EVENT_READY = offsetof(NRF_RADIO_Type, EVENTS_READY), NRF_RADIO_EVENT_ADDRESS = offsetof(NRF_RADIO_Type, EVENTS_ADDRESS), NRF_RADIO_EVENT_END = offsetof(NRF_RADIO_Type, EVENTS_END), NRF_RADIO_EVENT_DISABLED = offsetof(NRF_RADIO_Type, EVENTS_DISABLED),
  NRF_RADIO_EVENT_RSSIEND = offsetof(NRF_RADIO_Type, EVENTS_RSSIEND), NRF_RADIO_EVENT_BCMATCH = offsetof(NRF_RADIO_Type, EVENTS_BCMATCH), NRF_RADIO_EVENT_CRCOK = offsetof(NRF_RADIO_Type, EVENTS_CRCOK), NRF_RADIO_EVENT_CRCERROR = offsetof(NRF_RADIO_Type, EVENTS_CRCERROR),
  NRF_RADIO_EVENT_FRAMESTART = offsetof(NRF_RADIO_Type, EVENTS_FRAMESTART), NRF_RADIO_EVENT_EDEND = offsetof(NRF_RADIO_Type, EVENTS_EDEND), NRF_RADIO_EVENT_CCAIDLE = offsetof(NRF_RADIO_Type, EVENTS_CCAIDLE), NRF_RADIO_EVENT_CCABUSY = offsetof(NRF_RADIO_Type, EVENTS_CCABUSY),
  NRF_RADIO_EVENT_TXREADY = offsetof(NRF_RADIO_Type, EVENTS_TXREADY), NRF_RADIO_EVENT_RXREADY = offsetof(NRF_RADIO_Type, EVENTS_RXREADY), NRF_RADIO_EVENT_MHRMATCH = offsetof(NRF_RADIO_Type, EVENTS_MHRMATCH), NRF_RADIO_EVENT_PHYEND = offsetof(NRF_RADIO_Type, EVENTS_PHYEND)
}
 RADIO events. More...
 
enum  nrf_radio_int_mask_t {
  NRF_RADIO_INT_READY_MASK = RADIO_INTENSET_READY_Msk, NRF_RADIO_INT_ADDRESS_MASK = RADIO_INTENSET_ADDRESS_Msk, NRF_RADIO_INT_END_MASK = RADIO_INTENSET_END_Msk, NRF_RADIO_INT_DISABLED_MASK = RADIO_INTENSET_DISABLED_Msk,
  NRF_RADIO_INT_RSSIEND_MASK = RADIO_INTENSET_RSSIEND_Msk, NRF_RADIO_INT_BCMATCH_MASK = RADIO_INTENSET_BCMATCH_Msk, NRF_RADIO_INT_CRCOK_MASK = RADIO_INTENSET_CRCOK_Msk, NRF_RADIO_INT_CRCERROR_MASK = RADIO_INTENSET_CRCERROR_Msk,
  NRF_RADIO_INT_FRAMESTART_MASK = RADIO_INTENSET_FRAMESTART_Msk, NRF_RADIO_INT_EDEND_MASK = RADIO_INTENSET_EDEND_Msk, NRF_RADIO_INT_CCAIDLE_MASK = RADIO_INTENSET_CCAIDLE_Msk, NRF_RADIO_INT_CCABUSY_MASK = RADIO_INTENSET_CCABUSY_Msk,
  NRF_RADIO_INT_PHYEND_MASK = RADIO_INTENSET_PHYEND_Msk
}
 RADIO interrupts. More...
 
enum  nrf_radio_short_mask_t {
  NRF_RADIO_SHORT_READY_START_MASK = RADIO_SHORTS_READY_START_Msk, NRF_RADIO_SHORT_END_DISABLE_MASK = RADIO_SHORTS_END_DISABLE_Msk, NRF_RADIO_SHORT_DISABLED_TXEN_MASK = RADIO_SHORTS_DISABLED_TXEN_Msk, NRF_RADIO_SHORT_DISABLED_RXEN_MASK = RADIO_SHORTS_DISABLED_RXEN_Msk,
  NRF_RADIO_SHORT_ADDRESS_RSSISTART_MASK = RADIO_SHORTS_ADDRESS_RSSISTART_Msk, NRF_RADIO_SHORT_ADDRESS_BCSTART_MASK = RADIO_SHORTS_ADDRESS_BCSTART_Msk, NRF_RADIO_SHORT_END_START_MASK = RADIO_SHORTS_END_START_Msk, NRF_RADIO_SHORT_RXREADY_CCASTART_MASK = RADIO_SHORTS_RXREADY_CCASTART_Msk,
  NRF_RADIO_SHORT_CCAIDLE_TXEN_MASK = RADIO_SHORTS_CCAIDLE_TXEN_Msk, NRF_RADIO_SHORT_CCABUSY_DISABLE_MASK = RADIO_SHORTS_CCABUSY_DISABLE_Msk, NRF_RADIO_SHORT_FRAMESTART_BCSTART_MASK = RADIO_SHORTS_FRAMESTART_BCSTART_Msk, NRF_RADIO_SHORT_READY_EDSTART_MASK = RADIO_SHORTS_READY_EDSTART_Msk,
  NRF_RADIO_SHORT_EDEND_DISABLE_MASK = RADIO_SHORTS_EDEND_DISABLE_Msk, NRF_RADIO_SHORT_TXREADY_START_MASK = RADIO_SHORTS_TXREADY_START_Msk, NRF_RADIO_SHORT_RXREADY_START_MASK = RADIO_SHORTS_RXREADY_START_Msk, NRF_RADIO_SHORT_PHYEND_DISABLE_MASK = RADIO_SHORTS_PHYEND_DISABLE_Msk,
  NRF_RADIO_SHORT_PHYEND_START_MASK = RADIO_SHORTS_PHYEND_START_Msk
}
 Types of RADIO shortcuts. More...
 
enum  nrf_radio_cca_mode_t { NRF_RADIO_CCA_MODE_ED = RADIO_CCACTRL_CCAMODE_EdMode, NRF_RADIO_CCA_MODE_CARRIER = RADIO_CCACTRL_CCAMODE_CarrierMode, NRF_RADIO_CCA_MODE_CARRIER_AND_ED = RADIO_CCACTRL_CCAMODE_CarrierAndEdMode, NRF_RADIO_CCA_MODE_CARRIER_OR_ED = RADIO_CCACTRL_CCAMODE_CarrierOrEdMode }
 Types of RADIO Clear Channel Assessment modes. More...
 
enum  nrf_radio_state_t {
  NRF_RADIO_STATE_DISABLED = RADIO_STATE_STATE_Disabled, NRF_RADIO_STATE_RX_RU = RADIO_STATE_STATE_RxRu, NRF_RADIO_STATE_RX_IDLE = RADIO_STATE_STATE_RxIdle, NRF_RADIO_STATE_RX = RADIO_STATE_STATE_Rx,
  NRF_RADIO_STATE_RX_DISABLE = RADIO_STATE_STATE_RxDisable, NRF_RADIO_STATE_TX_RU = RADIO_STATE_STATE_TxRu, NRF_RADIO_STATE_TX_IDLE = RADIO_STATE_STATE_TxIdle, NRF_RADIO_STATE_TX = RADIO_STATE_STATE_Tx,
  NRF_RADIO_STATE_TX_DISABLE = RADIO_STATE_STATE_TxDisable
}
 Types of RADIO States. More...
 
enum  nrf_radio_crc_status_t { NRF_RADIO_CRC_STATUS_ERROR = RADIO_CRCSTATUS_CRCSTATUS_CRCError, NRF_RADIO_CRC_STATUS_OK = RADIO_CRCSTATUS_CRCSTATUS_CRCOk }
 Types of CRC status. More...
 
enum  nrf_radio_mode_t {
  NRF_RADIO_MODE_NRF_1MBIT = RADIO_MODE_MODE_Nrf_1Mbit, NRF_RADIO_MODE_NRF_2MBIT = RADIO_MODE_MODE_Nrf_2Mbit, NRF_RADIO_MODE_BLE_1MBIT = RADIO_MODE_MODE_Ble_1Mbit, NRF_RADIO_MODE_BLE_2MBIT = RADIO_MODE_MODE_Ble_2Mbit,
  NRF_RADIO_MODE_IEEE802154_250KBIT = RADIO_MODE_MODE_Ieee802154_250Kbit
}
 Types of RADIO modes (data rate and modulation). More...
 
enum  nrf_radio_preamble_length_t { NRF_RADIO_PREAMBLE_LENGTH_8BIT = RADIO_PCNF0_PLEN_8bit, NRF_RADIO_PREAMBLE_LENGTH_16BIT = RADIO_PCNF0_PLEN_16bit, NRF_RADIO_PREAMBLE_LENGTH_32BIT_ZERO = RADIO_PCNF0_PLEN_32bitZero, NRF_RADIO_PREAMBLE_LENGTH_LONG_RANGE = RADIO_PCNF0_PLEN_LongRange }
 Types of preamble length. More...
 
enum  nrf_radio_crc_includes_addr_t { NRF_RADIO_CRC_INCLUDES_ADDR_INCLUDE = RADIO_CRCCNF_SKIPADDR_Include, NRF_RADIO_CRC_INCLUDES_ADDR_SKIP = RADIO_CRCCNF_SKIPADDR_Skip, NRF_RADIO_CRC_INCLUDES_ADDR_IEEE802154 = RADIO_CRCCNF_SKIPADDR_Ieee802154 }
 Types of CRC calculatons regarding address. More...
 
enum  nrf_radio_ramp_up_mode_t { NRF_RADIO_RAMP_UP_MODE_DEFAULT = RADIO_MODECNF0_RU_Default, NRF_RADIO_RAMP_UP_MODE_FAST = RADIO_MODECNF0_RU_Fast }
 Types of radio ramp-up mode. More...
 

Functions

__STATIC_INLINE void nrf_radio_int_enable (uint32_t radio_int_mask)
 Function for enabling interrupts. More...
 
__STATIC_INLINE void nrf_radio_int_disable (uint32_t radio_int_mask)
 Function for disabling interrupts. More...
 
__STATIC_INLINE bool nrf_radio_int_get (nrf_radio_int_mask_t radio_int_mask)
 Function for getting the state of a specific interrupt. More...
 
__STATIC_INLINE uint32_t * nrf_radio_task_address_get (nrf_radio_task_t radio_task)
 Function for getting the address of a specific task. More...
 
__STATIC_INLINE void nrf_radio_task_trigger (nrf_radio_task_t radio_task)
 Function for setting a specific task. More...
 
__STATIC_INLINE uint32_t * nrf_radio_event_address_get (nrf_radio_event_t radio_event)
 Function for getting address of a specific event. More...
 
__STATIC_INLINE void nrf_radio_event_clear (nrf_radio_event_t radio_event)
 Function for clearing a specific event. More...
 
__STATIC_INLINE bool nrf_radio_event_get (nrf_radio_event_t radio_event)
 Function for getting the state of a specific event. More...
 
__STATIC_INLINE void nrf_radio_shorts_enable (uint32_t radio_short_mask)
 Function for setting shortcuts. More...
 
__STATIC_INLINE void nrf_radio_shorts_disable (uint32_t radio_short_mask)
 Function for clearing shortcuts. More...
 
__STATIC_INLINE void nrf_radio_shorts_set (uint32_t radio_short_mask)
 Function for setting shortcuts. More...
 
__STATIC_INLINE uint32_t nrf_radio_shorts_get (void)
 Function for getting shortcuts. More...
 
__STATIC_INLINE nrf_radio_state_t nrf_radio_state_get (void)
 Function for getting present state of the radio module.
 
__STATIC_INLINE void nrf_radio_packet_ptr_set (const void *p_radio_packet_ptr)
 Function for setting Packet Pointer to given location in memory. More...
 
__STATIC_INLINE
nrf_radio_crc_status_t 
nrf_radio_crc_status_get (void)
 Function for getting CRC status of last received packet.
 
__STATIC_INLINE void nrf_radio_cca_mode_set (nrf_radio_cca_mode_t radio_cca_mode)
 Function for setting Clear Channel Assessment mode. More...
 
__STATIC_INLINE void nrf_radio_cca_ed_threshold_set (uint8_t radio_cca_ed_threshold)
 Function for setting CCA Energy Busy Threshold. More...
 
__STATIC_INLINE void nrf_radio_cca_corr_threshold_set (uint8_t radio_cca_corr_threshold_set)
 Function for setting CCA Correlator Busy Threshold. More...
 
__STATIC_INLINE void nrf_radio_cca_corr_counter_set (uint8_t radio_cca_corr_counter_set)
 Function for setting limit of occurances above Correlator Threshold. More...
 
__STATIC_INLINE void nrf_radio_mode_set (nrf_radio_mode_t radio_mode)
 Function for setting Radio data rate and modulation settings. More...
 
__STATIC_INLINE void nrf_radio_config_length_field_length_set (uint8_t radio_length_length)
 Function for setting Length of LENGTH field in number of bits. More...
 
__STATIC_INLINE void nrf_radio_config_preamble_length_set (nrf_radio_preamble_length_t radio_preamble_length)
 Function for setting length of preamble on air. More...
 
__STATIC_INLINE void nrf_radio_config_crc_included_set (bool radio_length_contains_crc)
 Function for setting if LENGTH field contains CRC. More...
 
__STATIC_INLINE void nrf_radio_config_max_length_set (uint8_t radio_max_packet_length)
 Function for setting maximum length of packet payload. More...
 
__STATIC_INLINE void nrf_radio_crc_length_set (uint8_t radio_crc_length)
 Function for setting CRC length. More...
 
__STATIC_INLINE void nrf_radio_crc_includes_address_set (nrf_radio_crc_includes_addr_t radio_crc_skip_address)
 Function for setting if address filed should be included or excluded from CRC calculation. More...
 
__STATIC_INLINE void nrf_radio_crc_polynominal_set (uint32_t radio_crc_polynominal)
 Function for setting CRC polynominal. More...
 
__STATIC_INLINE uint32_t nrf_radio_crc_polynominal_get (void)
 Function for getting CRC polynominal. More...
 
__STATIC_INLINE uint8_t nrf_radio_rssi_sample_get (void)
 Function for getting RSSI sample result. More...
 
__STATIC_INLINE void nrf_radio_mhmu_search_pattern_set (uint32_t radio_mhmu_search_pattern)
 Function for setting MAC Header Match Unit search pattern configuration. More...
 
__STATIC_INLINE void nrf_radio_mhmu_pattern_mask_set (uint32_t radio_mhmu_pattern_mask)
 Function for setting MAC Header Match Unit pattern mask configuration. More...
 
__STATIC_INLINE void nrf_radio_ramp_up_mode_set (nrf_radio_ramp_up_mode_t ramp_up_mode)
 Function for setting radio ramp-up mode. More...
 
__STATIC_INLINE void nrf_radio_frequency_set (uint32_t radio_frequency)
 Function for setting radio frequency. More...
 
__STATIC_INLINE uint32_t nrf_radio_frequency_get (void)
 Function for getting radio frequency. More...
 
__STATIC_INLINE void nrf_radio_tx_power_set (int8_t radio_tx_power)
 Function for setting radio transmit power. More...
 
__STATIC_INLINE void nrf_radio_ifs_set (uint32_t radio_ifs)
 Function for setting Inter Frame Spacing. More...
 
__STATIC_INLINE uint32_t nrf_radio_ifs_get (void)
 Function for getting Inter Frame Spacing. More...
 
__STATIC_INLINE void nrf_radio_bcc_set (uint32_t radio_bcc)
 Function for setting Bit counter compare. More...
 
__STATIC_INLINE uint32_t nrf_radio_bcc_get (void)
 Function for getting Bit counter compare.
 
__STATIC_INLINE uint8_t nrf_radio_ed_sample_get (void)
 Function for getting Energy Detection level.
 
__STATIC_INLINE void nrf_radio_ed_loop_count_set (uint32_t radio_ed_loop_count)
 Function for setting number of iterations to perform ED scan. More...
 
__STATIC_INLINE void nrf_radio_power_set (bool radio_power)
 Function for setting power mode of the radio peripheral. More...
 

Detailed Description

Hardware access layer for managing the radio (RADIO).

Enumeration Type Documentation

Types of RADIO Clear Channel Assessment modes.

Enumerator
NRF_RADIO_CCA_MODE_ED 

Energy Above Threshold. Will report busy whenever energy is detected above set threshold.

NRF_RADIO_CCA_MODE_CARRIER 

Carrier Seen. Will report busy whenever compliant IEEE 802.15.4 signal is seen.

NRF_RADIO_CCA_MODE_CARRIER_AND_ED 

Energy Above Threshold AND Carrier Seen.

NRF_RADIO_CCA_MODE_CARRIER_OR_ED 

Energy Above Threshold OR Carrier Seen.

Types of CRC calculatons regarding address.

Enumerator
NRF_RADIO_CRC_INCLUDES_ADDR_INCLUDE 

CRC calculation includes address field.

NRF_RADIO_CRC_INCLUDES_ADDR_SKIP 

CRC calculation does not include address field.

NRF_RADIO_CRC_INCLUDES_ADDR_IEEE802154 

CRC calculation as per 802.15.4 standard.

Types of CRC status.

Enumerator
NRF_RADIO_CRC_STATUS_ERROR 

Packet received with CRC error.

NRF_RADIO_CRC_STATUS_OK 

Packet received with CRC ok.

RADIO events.

Enumerator
NRF_RADIO_EVENT_READY 

Radio has ramped up and is ready to be started.

NRF_RADIO_EVENT_ADDRESS 

Address sent or received.

NRF_RADIO_EVENT_END 

Packet transmitted or received.

NRF_RADIO_EVENT_DISABLED 

Radio has been disabled.

NRF_RADIO_EVENT_RSSIEND 

Sampling of receive signal strength complete.

NRF_RADIO_EVENT_BCMATCH 

Bit counter reached bit count value.

NRF_RADIO_EVENT_CRCOK 

Packet received with correct CRC.

NRF_RADIO_EVENT_CRCERROR 

Packet received with incorrect CRC.

NRF_RADIO_EVENT_FRAMESTART 

IEEE 802.15.4 length field received.

NRF_RADIO_EVENT_EDEND 

Energy Detection procedure ended.

NRF_RADIO_EVENT_CCAIDLE 

Wireless medium is idle.

NRF_RADIO_EVENT_CCABUSY 

Wireless medium is busy.

NRF_RADIO_EVENT_TXREADY 

Radio has ramped up and is ready to be started TX path.

NRF_RADIO_EVENT_RXREADY 

Radio has ramped up and is ready to be started RX path.

NRF_RADIO_EVENT_MHRMATCH 

MAC Header match found.

NRF_RADIO_EVENT_PHYEND 

Generated in Ble_LR125Kbit, Ble_LR500Kbit and Ieee802154_250Kbit modes when last bit is sent on air.

RADIO interrupts.

Enumerator
NRF_RADIO_INT_READY_MASK 

Mask for enabling or disabling an interrupt on READY event.

NRF_RADIO_INT_ADDRESS_MASK 

Mask for enabling or disabling an interrupt on ADDRESS event.

NRF_RADIO_INT_END_MASK 

Mask for enabling or disabling an interrupt on END event.

NRF_RADIO_INT_DISABLED_MASK 

Mask for enabling or disabling an interrupt on DISABLED event.

NRF_RADIO_INT_RSSIEND_MASK 

Mask for enabling or disabling an interrupt on RSSIEND event.

NRF_RADIO_INT_BCMATCH_MASK 

Mask for enabling or disabling an interrupt on BCMATCH event.

NRF_RADIO_INT_CRCOK_MASK 

Mask for enabling or disabling an interrupt on CRCOK event.

NRF_RADIO_INT_CRCERROR_MASK 

Mask for enabling or disabling an interrupt on CRCERROR event.

NRF_RADIO_INT_FRAMESTART_MASK 

Mask for enabling or disabling an interrupt on FRAMESTART event.

NRF_RADIO_INT_EDEND_MASK 

Mask for enabling or disabling an interrupt on EDEND event.

NRF_RADIO_INT_CCAIDLE_MASK 

Mask for enabling or disabling an interrupt on CCAIDLE event.

NRF_RADIO_INT_CCABUSY_MASK 

Mask for enabling or disabling an interrupt on CCABUSY event.

NRF_RADIO_INT_PHYEND_MASK 

Mask for enabling or disabling an interrupt on PHYEND event.

Types of RADIO modes (data rate and modulation).

Enumerator
NRF_RADIO_MODE_NRF_1MBIT 

1Mbit/s Nordic proprietary radio mode.

NRF_RADIO_MODE_NRF_2MBIT 

2Mbit/s Nordic proprietary radio mode.

NRF_RADIO_MODE_BLE_1MBIT 

1 Mbit/s Bluetooth Low Energy.

NRF_RADIO_MODE_BLE_2MBIT 

2 Mbit/s Bluetooth Low Energy.

NRF_RADIO_MODE_IEEE802154_250KBIT 

IEEE 802.15.4-2006 250 kbit/s.

Types of preamble length.

Enumerator
NRF_RADIO_PREAMBLE_LENGTH_8BIT 

8-bit preamble.

NRF_RADIO_PREAMBLE_LENGTH_16BIT 

16-bit preamble.

NRF_RADIO_PREAMBLE_LENGTH_32BIT_ZERO 

32-bit zero preamble used for IEEE 802.15.4.

NRF_RADIO_PREAMBLE_LENGTH_LONG_RANGE 

Preamble - used for BTLE Long Range.

Types of radio ramp-up mode.

Enumerator
NRF_RADIO_RAMP_UP_MODE_DEFAULT 

Default ramp-up mode.

NRF_RADIO_RAMP_UP_MODE_FAST 

Fast ramp-up mode.

Types of RADIO shortcuts.

Enumerator
NRF_RADIO_SHORT_READY_START_MASK 

Mask for setting shortcut between EVENT_READY and TASK_START.

NRF_RADIO_SHORT_END_DISABLE_MASK 

Mask for setting shortcut between EVENT_END and TASK_DISABLE.

NRF_RADIO_SHORT_DISABLED_TXEN_MASK 

Mask for setting shortcut between EVENT_DISABLED and TASK_TXEN.

NRF_RADIO_SHORT_DISABLED_RXEN_MASK 

Mask for setting shortcut between EVENT_DISABLED and TASK_RXEN.

NRF_RADIO_SHORT_ADDRESS_RSSISTART_MASK 

Mask for setting shortcut between EVENT_ADDRESS and TASK_RSSISTART.

NRF_RADIO_SHORT_ADDRESS_BCSTART_MASK 

Mask for setting shortcut between EVENT_ADDRESS and TASK_BCSTART.

NRF_RADIO_SHORT_END_START_MASK 

Mask for setting shortcut between EVENT_END and TASK_START.

NRF_RADIO_SHORT_RXREADY_CCASTART_MASK 

Mask for setting shortcut between EVENT_RXREADY and TASK_CCASTART.

NRF_RADIO_SHORT_CCAIDLE_TXEN_MASK 

Mask for setting shortcut between EVENT_CCAIDLE and TASK_TXEN.

NRF_RADIO_SHORT_CCABUSY_DISABLE_MASK 

Mask for setting shortcut between EVENT_CCABUSY and TASK_DISABLE.

NRF_RADIO_SHORT_FRAMESTART_BCSTART_MASK 

Mask for setting shortcut between EVENT_FRAMESTART and TASK_BCSTART.

NRF_RADIO_SHORT_READY_EDSTART_MASK 

Mask for setting shortcut between EVENT_READY and TASK_EDSTART.

NRF_RADIO_SHORT_EDEND_DISABLE_MASK 

Mask for setting shortcut between EVENT_EDEND and TASK_DISABLE.

NRF_RADIO_SHORT_TXREADY_START_MASK 

Mask for setting shortcut between EVENT_TXREADY and TASK_START.

NRF_RADIO_SHORT_RXREADY_START_MASK 

Mask for setting shortcut between EVENT_RXREADY and TASK_START.

NRF_RADIO_SHORT_PHYEND_DISABLE_MASK 

Mask for setting shortcut between EVENT_PHYEND and TASK_DISABLE.

NRF_RADIO_SHORT_PHYEND_START_MASK 

Mask for setting shortcut between EVENT_PHYEND and TASK_START.

Types of RADIO States.

Enumerator
NRF_RADIO_STATE_DISABLED 

No operations are going on inside the radio and the power consumption is at a minimum.

NRF_RADIO_STATE_RX_RU 

The radio is ramping up and preparing for reception.

NRF_RADIO_STATE_RX_IDLE 

The radio is ready for reception to start.

NRF_RADIO_STATE_RX 

Reception has been started.

NRF_RADIO_STATE_RX_DISABLE 

The radio is disabling the receiver.

NRF_RADIO_STATE_TX_RU 

The radio is ramping up and preparing for transmission.

NRF_RADIO_STATE_TX_IDLE 

The radio is ready for transmission to start.

NRF_RADIO_STATE_TX 

The radio is transmitting a packet.

NRF_RADIO_STATE_TX_DISABLE 

The radio is disabling the transmitter.

RADIO tasks.

Enumerator
NRF_RADIO_TASK_TXEN 

Enable radio transmitter.

NRF_RADIO_TASK_RXEN 

Enable radio receiver.

NRF_RADIO_TASK_START 

Start radio transmission or reception.

NRF_RADIO_TASK_STOP 

Stop radio transmission or reception.

NRF_RADIO_TASK_DISABLE 

Disable radio transmitter and receiver.

NRF_RADIO_TASK_CCASTART 

Start Clear Channel Assessment procedure.

NRF_RADIO_TASK_CCASTOP 

Stop Clear Channel Assessment procedure.

NRF_RADIO_TASK_EDSTART 

Start Energy Detection procedure.

NRF_RADIO_TASK_EDSTOP 

Stop Energy Detection procedure.

NRF_RADIO_TASK_RSSISTART 

Start the RSSI and take one single sample of received signal strength.

Function Documentation

__STATIC_INLINE void nrf_radio_bcc_set ( uint32_t  radio_bcc)

Function for setting Bit counter compare.

Parameters
[in]radio_bccBit counter compare [bits].
__STATIC_INLINE void nrf_radio_cca_corr_counter_set ( uint8_t  radio_cca_corr_counter_set)

Function for setting limit of occurances above Correlator Threshold.

When not equal to zero the correlator based signal detect is enabled.

Parameters
[in]radio_cca_corr_cntLimit of occurances above Correlator Threshold
__STATIC_INLINE void nrf_radio_cca_corr_threshold_set ( uint8_t  radio_cca_corr_threshold_set)

Function for setting CCA Correlator Busy Threshold.

Parameters
[in]radio_cca_corr_thresholdCorrelator Busy Threshold.
__STATIC_INLINE void nrf_radio_cca_ed_threshold_set ( uint8_t  radio_cca_ed_threshold)

Function for setting CCA Energy Busy Threshold.

Parameters
[in]radio_cca_ed_thresholdEnergy Detection threshold value.
__STATIC_INLINE void nrf_radio_cca_mode_set ( nrf_radio_cca_mode_t  radio_cca_mode)

Function for setting Clear Channel Assessment mode.

Parameters
[in]radio_cca_modeMode of CCA
__STATIC_INLINE void nrf_radio_config_crc_included_set ( bool  radio_length_contains_crc)

Function for setting if LENGTH field contains CRC.

Parameters
[in]radio_length_contains_crcTrue if LENGTH field should contain CRC.
__STATIC_INLINE void nrf_radio_config_length_field_length_set ( uint8_t  radio_length_length)

Function for setting Length of LENGTH field in number of bits.

Parameters
[in]radio_length_lengthLength of LENGTH field in number of bits.
__STATIC_INLINE void nrf_radio_config_max_length_set ( uint8_t  radio_max_packet_length)

Function for setting maximum length of packet payload.

Parameters
[in]radio_max_packet_lengthMaximum length of packet payload.
__STATIC_INLINE void nrf_radio_config_preamble_length_set ( nrf_radio_preamble_length_t  radio_preamble_length)

Function for setting length of preamble on air.

Parameters
[in]radio_preamble_lengthLength of preamble on air.
__STATIC_INLINE void nrf_radio_crc_includes_address_set ( nrf_radio_crc_includes_addr_t  radio_crc_skip_address)

Function for setting if address filed should be included or excluded from CRC calculation.

Parameters
[in]radio_crc_skip_addressInclude or exclude packet address field out of CRC.
__STATIC_INLINE void nrf_radio_crc_length_set ( uint8_t  radio_crc_length)

Function for setting CRC length.

Parameters
[in]radio_crc_lengthCRC length in number of bytes [0-3].
__STATIC_INLINE uint32_t nrf_radio_crc_polynominal_get ( void  )

Function for getting CRC polynominal.

Returns
CRC polynominal.
__STATIC_INLINE void nrf_radio_crc_polynominal_set ( uint32_t  radio_crc_polynominal)

Function for setting CRC polynominal.

Parameters
[in]radio_crc_polynominalCRC polynominal to set.
__STATIC_INLINE void nrf_radio_ed_loop_count_set ( uint32_t  radio_ed_loop_count)

Function for setting number of iterations to perform ED scan.

Parameters
[in]radio_ed_loop_countNumber of iterations during ED procedure.
__STATIC_INLINE uint32_t * nrf_radio_event_address_get ( nrf_radio_event_t  radio_event)

Function for getting address of a specific event.

This function can be used by the PPI module.

Parameters
[in]radio_eventEvent.
__STATIC_INLINE void nrf_radio_event_clear ( nrf_radio_event_t  radio_event)

Function for clearing a specific event.

Parameters
[in]radio_eventEvent.
__STATIC_INLINE bool nrf_radio_event_get ( nrf_radio_event_t  radio_event)

Function for getting the state of a specific event.

Parameters
[in]radio_eventEvent.
Return values
trueIf the event is not set.
falseIf the event is set.
__STATIC_INLINE uint32_t nrf_radio_frequency_get ( void  )

Function for getting radio frequency.

Returns
Frequency above 2400 MHz [MHz]
__STATIC_INLINE void nrf_radio_frequency_set ( uint32_t  radio_frequency)

Function for setting radio frequency.

Parameters
[in]radio_frequencyFrequency above 2400 MHz [MHz]
__STATIC_INLINE uint32_t nrf_radio_ifs_get ( void  )

Function for getting Inter Frame Spacing.

Returns
Current Inter Frame Spacing
__STATIC_INLINE void nrf_radio_ifs_set ( uint32_t  radio_ifs)

Function for setting Inter Frame Spacing.

Parameters
[in]radio_ifsInter frame spacing [us].
__STATIC_INLINE void nrf_radio_int_disable ( uint32_t  radio_int_mask)

Function for disabling interrupts.

Parameters
[in]radio_int_maskMask of interrupts.
__STATIC_INLINE void nrf_radio_int_enable ( uint32_t  radio_int_mask)

Function for enabling interrupts.

Parameters
[in]radio_int_maskMask of interrupts.
__STATIC_INLINE bool nrf_radio_int_get ( nrf_radio_int_mask_t  radio_int_mask)

Function for getting the state of a specific interrupt.

Parameters
[in]radio_int_maskInterrupt.
Return values
trueIf the interrupt is not enabled.
falseIf the interrupt is enabled.
__STATIC_INLINE void nrf_radio_mhmu_pattern_mask_set ( uint32_t  radio_mhmu_pattern_mask)

Function for setting MAC Header Match Unit pattern mask configuration.

Parameters
[in]radio_mhmu_pattern_maskPattern mask.
__STATIC_INLINE void nrf_radio_mhmu_search_pattern_set ( uint32_t  radio_mhmu_search_pattern)

Function for setting MAC Header Match Unit search pattern configuration.

Parameters
[in]radio_mhmu_search_patternSearch Pattern Configuration.
__STATIC_INLINE void nrf_radio_mode_set ( nrf_radio_mode_t  radio_mode)

Function for setting Radio data rate and modulation settings.

Parameters
[in]radio_modeMode of radio data rate and modulation.
__STATIC_INLINE void nrf_radio_packet_ptr_set ( const void *  p_radio_packet_ptr)

Function for setting Packet Pointer to given location in memory.

Parameters
[in]p_radio_packet_ptrPointer to tx or rx packet buffer.
__STATIC_INLINE void nrf_radio_power_set ( bool  radio_power)

Function for setting power mode of the radio peripheral.

Parameters
[in]radio_powerIf radio should powered on.
__STATIC_INLINE void nrf_radio_ramp_up_mode_set ( nrf_radio_ramp_up_mode_t  ramp_up_mode)

Function for setting radio ramp-up mode.

Parameters
[in]ramp_up_modeRadio ramp-up mode.
__STATIC_INLINE uint8_t nrf_radio_rssi_sample_get ( void  )

Function for getting RSSI sample result.

Note
The value is a positive value while the actual received signal is a negative value. Actual received signal strength is therefore as follows: received signal strength = - returned_value dBm .
__STATIC_INLINE void nrf_radio_shorts_disable ( uint32_t  radio_short_mask)

Function for clearing shortcuts.

Parameters
[in]radio_short_maskMask of shortcuts.
__STATIC_INLINE void nrf_radio_shorts_enable ( uint32_t  radio_short_mask)

Function for setting shortcuts.

Parameters
[in]radio_short_maskMask of shortcuts.
__STATIC_INLINE uint32_t nrf_radio_shorts_get ( void  )

Function for getting shortcuts.

Returns
Mask of shortcuts.
__STATIC_INLINE void nrf_radio_shorts_set ( uint32_t  radio_short_mask)

Function for setting shortcuts.

Parameters
[in]radio_short_maskMask of shortcuts.
__STATIC_INLINE uint32_t * nrf_radio_task_address_get ( nrf_radio_task_t  radio_task)

Function for getting the address of a specific task.

This function can be used by the PPI module.

Parameters
[in]radio_taskTask.
__STATIC_INLINE void nrf_radio_task_trigger ( nrf_radio_task_t  radio_task)

Function for setting a specific task.

Parameters
[in]radio_taskTask.
__STATIC_INLINE void nrf_radio_tx_power_set ( int8_t  radio_tx_power)

Function for setting radio transmit power.

Parameters
[in]radio_tx_powerTransmit power of the radio.