nRF5 SDK for Thread and Zigbee v4.0.0
Functions
Auto ACK management

Functions

void nrf_802154_auto_ack_set (bool enabled)
 Enables or disables the automatic acknowledgments (auto ACK). More...
 
bool nrf_802154_auto_ack_get (void)
 Checks if the auto ACK is enabled. More...
 
void nrf_802154_pan_coord_set (bool enabled)
 Configures the device as the PAN coordinator. More...
 
bool nrf_802154_pan_coord_get (void)
 Checks if the radio is configured as the PAN coordinator. More...
 
void nrf_802154_src_addr_matching_method_set (nrf_802154_src_addr_match_t match_method)
 Select the source matching algorithm. More...
 
bool nrf_802154_ack_data_set (const uint8_t *p_addr, bool extended, const void *p_data, uint16_t length, uint8_t data_type)
 Adds the address of a peer node for which the provided ACK data is to be added to the pending bit list. More...
 
bool nrf_802154_ack_data_clear (const uint8_t *p_addr, bool extended, uint8_t data_type)
 Removes the address of a peer node for which the ACK data is set from the pending bit list. More...
 
void nrf_802154_auto_pending_bit_set (bool enabled)
 Enables or disables setting a pending bit in automatically transmitted ACK frames. More...
 
bool nrf_802154_pending_bit_for_addr_set (const uint8_t *p_addr, bool extended)
 Adds the address of a peer node to the pending bit list. More...
 
bool nrf_802154_pending_bit_for_addr_clear (const uint8_t *p_addr, bool extended)
 Removes address of a peer node from the pending bit list. More...
 
void nrf_802154_pending_bit_for_addr_reset (bool extended)
 Removes all addresses of a given type from the pending bit list. More...
 

Detailed Description

Function Documentation

bool nrf_802154_ack_data_clear ( const uint8_t *  p_addr,
bool  extended,
uint8_t  data_type 
)

Removes the address of a peer node for which the ACK data is set from the pending bit list.

The ACK data that was previously set for the given address is automatically removed.

The pending bit list works differently, depending on the upper layer for which the source address matching method is selected:

  • For Thread, NRF_802154_SRC_ADDR_MATCH_THREAD
  • For Zigbee, NRF_802154_SRC_ADDR_MATCH_ZIGBEE
  • For Standard-compliant, NRF_802154_SRC_ADDR_MATCH_ALWAYS_1 For more information, see nrf_802154_src_addr_match_t.

The method can be set during initialization phase by calling nrf_802154_src_matching_method.

Parameters
[in]p_addrArray of bytes containing the address of the node (little-endian).
[in]extendedIf the given address is an extended MAC address or a short MAC address.
[in]data_typeType of data to be removed. Refer to the nrf_802154_ack_data_t type.
Return values
TrueAddress removed from the list.
FalseAddress not found in the list.
bool nrf_802154_ack_data_set ( const uint8_t *  p_addr,
bool  extended,
const void *  p_data,
uint16_t  length,
uint8_t  data_type 
)

Adds the address of a peer node for which the provided ACK data is to be added to the pending bit list.

The pending bit list works differently, depending on the upper layer for which the source address matching method is selected:

  • For Thread, NRF_802154_SRC_ADDR_MATCH_THREAD
  • For Zigbee, NRF_802154_SRC_ADDR_MATCH_ZIGBEE
  • For Standard-compliant, NRF_802154_SRC_ADDR_MATCH_ALWAYS_1 For more information, see nrf_802154_src_addr_match_t.

The method can be set during initialization phase by calling nrf_802154_src_matching_method.

Parameters
[in]p_addrArray of bytes containing the address of the node (little-endian).
[in]extendedIf the given address is an extended MAC address or a short MAC address.
[in]p_dataPointer to the buffer containing data to be set.
[in]lengthLength of p_data.
[in]data_typeType of data to be set. Refer to the nrf_802154_ack_data_t type.
Return values
TrueAddress successfully added to the list.
FalseNot enough memory to store this address in the list.
bool nrf_802154_auto_ack_get ( void  )

Checks if the auto ACK is enabled.

Return values
TrueAuto ACK is enabled.
FalseAuto ACK is disabled.
void nrf_802154_auto_ack_set ( bool  enabled)

Enables or disables the automatic acknowledgments (auto ACK).

Note
The auto ACK is enabled by default.

If the auto ACK is enabled, the driver prepares and sends ACK frames automatically aTurnaroundTime (192 us) after the proper frame is received. The driver prepares an ACK frame according to the data provided by nrf_802154_ack_data_set. When the auto ACK is enabled, the driver notifies the next higher layer about the received frame after the ACK frame is transmitted. If the auto ACK is disabled, the driver does not transmit ACK frames. It notifies the next higher layer about the received frames when a frame is received. In this mode, the next higher layer is responsible for sending the ACK frame. ACK frames should be sent using nrf_802154_transmit.

Parameters
[in]enabledIf the auto ACK should be enabled.
void nrf_802154_auto_pending_bit_set ( bool  enabled)

Enables or disables setting a pending bit in automatically transmitted ACK frames.

Note
Setting a pending bit in automatically transmitted ACK frames is enabled by default.

The radio driver automatically sends ACK frames in response frames destined for this node with the ACK Request bit set. The pending bit in the ACK frame can be set or cleared regarding data in the indirect queue destined for the ACK destination.

If setting a pending bit in ACK frames is disabled, the pending bit in every ACK frame is set. If setting a pending bit in ACK frames is enabled, the radio driver checks if there is data in the indirect queue destined for the ACK destination. If there is no such data, the pending bit is cleared.

Note
Due to the ISR latency, the radio driver might not be able to verify if there is data in the indirect queue before ACK is sent. In this case, the pending bit is set.
Parameters
[in]enabledIf setting a pending bit in ACK frames is enabled.
bool nrf_802154_pan_coord_get ( void  )

Checks if the radio is configured as the PAN coordinator.

Return values
trueThe radio is configured as the PAN coordinator.
falseThe radio is not configured as the PAN coordinator.
void nrf_802154_pan_coord_set ( bool  enabled)

Configures the device as the PAN coordinator.

Note
That information is used for packet filtering.
Parameters
[in]enabledThe radio is configured as the PAN coordinator.
bool nrf_802154_pending_bit_for_addr_clear ( const uint8_t *  p_addr,
bool  extended 
)

Removes address of a peer node from the pending bit list.

The pending bit list works differently, depending on the upper layer for which the source address matching method is selected:

  • For Thread, NRF_802154_SRC_ADDR_MATCH_THREAD
  • For Zigbee, NRF_802154_SRC_ADDR_MATCH_ZIGBEE
  • For Standard-compliant, NRF_802154_SRC_ADDR_MATCH_ALWAYS_1 For more information, see nrf_802154_src_addr_match_t.

The method can be set during initialization phase by calling nrf_802154_src_matching_method.

Parameters
[in]p_addrArray of bytes containing the address of the node (little-endian).
[in]extendedIf the given address is an extended MAC address or a short MAC address.
Return values
TrueThe address is successfully removed from the list.
FalseNo such address in the list.
void nrf_802154_pending_bit_for_addr_reset ( bool  extended)

Removes all addresses of a given type from the pending bit list.

The pending bit list works differently, depending on the upper layer for which the source address matching method is selected:

  • For Thread, NRF_802154_SRC_ADDR_MATCH_THREAD
  • For Zigbee, NRF_802154_SRC_ADDR_MATCH_ZIGBEE
  • For Standard-compliant, NRF_802154_SRC_ADDR_MATCH_ALWAYS_1 For more information, see nrf_802154_src_addr_match_t.

The method can be set during initialization phase by calling nrf_802154_src_matching_method.

Parameters
[in]extendedIf the function is to remove all extended MAC addresses or all short addresses.
bool nrf_802154_pending_bit_for_addr_set ( const uint8_t *  p_addr,
bool  extended 
)

Adds the address of a peer node to the pending bit list.

The pending bit list works differently, depending on the upper layer for which the source address matching method is selected:

  • For Thread, NRF_802154_SRC_ADDR_MATCH_THREAD
  • For Zigbee, NRF_802154_SRC_ADDR_MATCH_ZIGBEE
  • For Standard-compliant, NRF_802154_SRC_ADDR_MATCH_ALWAYS_1 For more information, see nrf_802154_src_addr_match_t.

The method can be set during initialization phase by calling nrf_802154_src_matching_method.

Note
This function makes a copy of the given address.
Parameters
[in]p_addrArray of bytes containing the address of the node (little-endian).
[in]extendedIf the given address is an extended MAC address or a short MAC address.
Return values
TrueThe address is successfully added to the list.
FalseNot enough memory to store the address in the list.
void nrf_802154_src_addr_matching_method_set ( nrf_802154_src_addr_match_t  match_method)

Select the source matching algorithm.

Note
This method should be called after driver initialization, but before transceiver is enabled.

When calling nrf_802154_ack_data_pending_bit_should_be_set, one of several algorithms for source address matching will be chosen. To ensure a specific algorithm is selected, call this function before rf_802154_ack_data_pending_bit_should_be_set.

Parameters
[in]match_methodSource address matching method to be used.

Documentation feedback | Developer Zone | Subscribe | Updated