Gazell Link Layer User Guide

nRF5 SDK v17.1.0

Introduction

Gazell is a protocol for setting up a robust wireless link between a single Host and up to eight Devices in a star network topology. It is designed to minimize power consumption in power-sensitive wireless desktop products and is also suitable for a range of other wireless applications.

To minimize the power consumption of the power-sensitive peripheral devices, Gazell uses the central hub (host side) with its more relaxed power constraints to keep the link open while the peripheral devices can sleep and save on power consumption. A typical example of this is a wireless mouse communicating with a USB dongle that is inserted into a computer.

Gazell has a sophisticated but easy-to-use channel switching and synchronization scheme, that gives robustness against interference and good wireless coexistence properties while still enabling high-throughput and low latency.

Features

  • Supports a star network topology with one Host and up to 8 Devices.
  • Bidirectional data transfer between each Host and Device.
  • Channel hopping functionality that gives a reliable wireless link in environments with interference from other radio sources.
  • Packet acknowledgement and automatic packet retransmission functionality to prevent data loss.
  • Individual TX and RX FIFOs for every data pipe.
  • Backward compatible with legacy nRF24L Series Gazell.
  • Devices self-synchronize to the Host, meaning:
    • No connection packets are required to setup a link.
    • No polling packets are required to maintain a link.
    • Devices can enter and remove themselves from the network at any time.
  • Capability to control RF Frontend Module.
  • Generates transmission statistics per each RF channel.

Resources

Gazell makes use of a fixed set of resources and requires exclusive access to them for Gazell to ensure correct operation. There are two options for what set of resources to be used:

  1. gzll_arm.lib
  • Radio (NRF_RADIO)
  • Timer: NRF_TIMER2)
  • PPI channels 0, 1, and 2
  • Software interrupt 0
  1. gzll_sd_resources_arm.lib (reusing the same resources used by the S1xx Bluetooth Smart softdevice library from Nordic):
  • Radio (NRF_RADIO)
  • Timer: NRF_TIMER0)
  • PPI Channels 8, 9, and 10
  • Software interrupt 1

The radio and timer interrupt handlers run at priority level 0 (highest level), and the Gazell callback functions run at priority level 1. Applications should run at priority level 2 or higher in order to ensure correct operation.

Gazell can be customized at runtime for a range of different applications. See the Gazell Link Layer for a list of configuration functions as well as the default and constant parameters.

Note: Editing the header file containing the default and constant parameters does not change their value when compiling a new project. These values are provided as a useful reference when making an application with the precompiled library.

Gazell modes

A member of a Gazell star network is either a Host or Device. Up to 8 Devices can communicate with a single Host. Each Host can communicate with up to 8 Devices. Each Device communicates to a single Host.

Page-1 Circle Host Host Circle.2 Device 7 Device 7 Circle.3 Device 0 Device 0 Circle.4 Device 1 Device 1 Circle.5 Device 2 Device 2 Circle.7 Device 6 Device 6 Circle.8 Device 5 Device 5 Circle.9 Device 4 Device 4 Circle.10 Device 3 Device 3 Sheet.236 Sheet.237 Sheet.238 Sheet.239 Sheet.240 Sheet.241 Sheet.242 Sheet.243
Gazell star network

Once enabled, the Host in a Gazell network is always listening, and it is the Device that always initiates a communication. Each packet that a Device sends is required to be acknowledged by the Host. It is possible for the Host to send data to the Device by piggybacking data to an acknowledgement (ACK) packet. Therefore a Host has to wait for a packet from a Device before it can send any data to it.

It is possible to build more sophisticated Gazell networks, since a single Device is able to speak to several Hosts and any node is able to change between the two modes. However, this requires the application to coordinate such a network.

In this document, we focus here on the typical use-case as a star network with static modes.

Setting up a Gazell application

Gazell automatically handles all synchronization and packet handling. All the user is required to do is to add payloads to the transmit (TX) FIFOs and read payloads from the receive (RX) FIFOs. Gazell automatically notifies the application when a packet is received.

To set up a Gazell application, do the following:

Gazell can also be disabled at any time using the nrf_gzll_disable() function. When this is called Gazell will complete any ongoing transmission or reception before being disabled. (That is, until the end of the current timeslot, a concept we explain later in the section on Timeslots ). When the disabling operation is complete, Gazell will call the nrf_gzll_disabled() function. By the time this callback is made, the Gazell CPU context, radio and Gazell timer will have stopped. It is now possible to call any of the configuration set functions, which will be in force, once Gazell is enabled again.

Package transactions

A typical packet transaction between a Device and a Host consists of a Device initiating the transaction by sending a data packet to the Host and the Host sending an ACK packet in return.

When an ACK packet is received by the Device, it knows that the initial packet was successfully transmitted and the nrf_gzll_device_tx_success() callback function will be called to notify the application of this.

Similarly, when the initial packet is received by the Host, the nrf_gzll_host_rx_data_ready() callback function will be called to notify to the application that a new packet has been received.

Note that these callback functions are actually queued so that the application avoids race conditions. This is discussed later in the section Callback queueing .

Page-1 Sheet.256 Sheet.257 Device operation Device operation Rectangle.260 Rectangle.261 Sheet.270 Sheet.271 Host operation Host operation Rectangle.272 Rectangle.273 Annotation/Comment.291 Sheet.307 Sheet.308 Sheet.309 Sheet.310 Sheet.311 Sheet.312 Sheet.313 Sheet.314 Sheet.315 Sheet.316 Sheet.317 Sheet.318 Sheet.319 Sheet.320 Device callback: nrf_gzll_device_tx_success() Device callback: nrf_gzll_device_tx_success() Annotation/Comment.366 Sheet.367 Sheet.368 Sheet.369 Sheet.370 Sheet.371 Sheet.372 Sheet.373 Sheet.374 Sheet.375 Sheet.376 Sheet.377 Sheet.378 Sheet.379 Sheet.380 Host callback: nrf_gzll_host_rx_data_ready() Host callback: nrf_gzll_host_rx_data_ready() s.384 Receive ACK Receive ACK s.free Listen Listen s.free.389 Listen Listen Sheet.400 Sheet.401 s.3 Send packet Send packet s.403 Send ACK Send ACK s.405 Receive packet Receive packet Rectangle.410
Successful packet transaction

A transaction can fail if the initial packet from the Device was not received correctly by the Host, or the corresponding ACK packet was not received correctly by the Device. Note that packets with a failing Cyclic Redundancy Check (CRC) are ignored by Gazell.

If a transaction fails the Device will attempt to retransmit the initial packet to the Host until the ACK is finally received or the maximum number of transmission attempts is reached. If the maximum number of transmission attempts is reached the retransmissions will stop and the nrf_gzll_device_tx_failed() callback will be called.

If only the ACK packet sent from the Host to the Device is lost, but both the initial packet and the subsequent retransmission attempts are being successfully received by the Host, the repeated packets will be discarded by the Host, but the ACK packets will still be sent in return to the Device. This prevents the application receiving duplicate data packets at the Host.

Page-1 Sheet.227 Sheet.228 Device operation Device operation Rectangle.260 Rectangle.261 Sheet.231 Sheet.232 Host operation Host operation Rectangle.272 Annotation/Comment Sheet.236 Sheet.237 Sheet.238 Sheet.239 Sheet.240 Sheet.241 Sheet.242 Sheet.243 Sheet.244 Sheet.245 Sheet.246 Sheet.247 Sheet.248 Sheet.249 Initial packet Initial packet Annotation/Comment.291 Sheet.251 Sheet.252 Sheet.253 Sheet.254 Sheet.255 Sheet.256 Sheet.257 Sheet.258 Sheet.259 Sheet.260 Sheet.261 Sheet.262 Sheet.263 Sheet.264 Retransmit attempt 1 Retransmit attempt 1 Annotation/Comment.321 Sheet.266 Sheet.267 Sheet.268 Sheet.269 Sheet.270 Sheet.271 Sheet.272 Sheet.273 Sheet.274 Sheet.275 Sheet.276 Sheet.277 Sheet.278 Sheet.279 Retransmit attempt 2 Retransmit attempt 2 Annotation/Comment.336 Sheet.281 Sheet.282 Sheet.283 Sheet.284 Sheet.285 Sheet.286 Sheet.287 Sheet.288 Sheet.289 Sheet.290 Sheet.291 Sheet.292 Sheet.293 Sheet.294 Device callback: nrf_gzll_device_tx_failed() Device callback: nrf_gzll_device_tx_failed() Annotation/Comment.351 Sheet.296 Sheet.297 Sheet.298 Sheet.299 Sheet.300 Sheet.301 Sheet.302 Sheet.303 Sheet.304 Sheet.305 Sheet.306 Sheet.307 Sheet.308 Sheet.309 Host callback: nrf_gzll_host_rx_data_ready() Host callback: nrf_gzll_host_rx_data_ready() Annotation/Comment.366 Sheet.311 Sheet.312 Sheet.313 Sheet.314 Sheet.315 Sheet.316 Sheet.317 Sheet.318 Sheet.319 Sheet.320 Sheet.321 Sheet.322 Sheet.323 Sheet.324 Packet recognized as retransmit attempt and discarded by Host. Packet recognized as retransmit attempt and discarded by Host. s.free Listen Listen s.free.389 Listen Listen Sheet.328 Sheet.329 s.3 Send packet Send packet s.331 Send ACK Send ACK s.405 Receive packet Receive packet Rectangle.391 Rectangle.392 s.394 Resend packet Resend packet Rectangle.395 Rectangle.396 s.398 Resend packet Resend packet s.free.401 Listen Listen s.1.403 Receive packet Receive packet Sheet.404 Sheet.406 Rectangle.273 Rectangle.400 s.free.411 Wait for ACK Wait for ACK s.free.412 Wait for ACK Wait for ACK Deletion Sheet.414 Sheet.417 Deletion.418 Sheet.419 Deletion.422 Sheet.423 s.free.450 Wait for ACK Wait for ACK
Example on failing package transaction.

In the figure above the maximum number of allowed transmission attempts is set to 3.

Packet identification

Any packet transmitted from a Device to a Host is uniquely identified by a two bit packet ID field in the packet header together with the packet's 16-bit Cyclic Redundancy Check (CRC). This packet ID is used to distinguish a new packet from the previous packet if it has the same payload.

On the Host side, retransmitted packets will be discarded and not added to an RX FIFO.

Pipes and addressing

Each logical address on the nodes is termed a pipe. Each pipe maps to one on-air address used when transmitting or receiving packets.

The on-air addresses are composed of a 2-4 byte long "base address" in addition to a 1 byte prefix address. Note that the nRF51 radio uses an alternating sequence of 0s and 1s as the preamble of the packet. Therefore, for packets to be received correctly, the most significant byte of the base address should not be an alternating sequence of 0s and 1s, that is, it should not be 0x55 or 0xAA.

Pipe 0 has its own unique base address, which is base address 0, while pipes 1-7 use the same base address, which is base address 1.

Each of the 8 pipes have a unique byte-long prefix address.

On-air, the most significant bit of each address byte will be transmitted first. The most significant byte of the 4 byte long base address is the first transmitted address byte, while the prefix byte is transmitted last.

Note: The byte ordering in Gazell and the nRF51 radio peripheral are not the same, this is because the address bytes are rearranged in Gazell to match the nRF24L radios.

FIFOs

All 8 pipes on both the Device and the Host have two First-in First-out (FIFO) buffers that can hold packets. Each pipe has a TX FIFO and an RX FIFO. The total number of packets in the FIFOs is 6, while every individual TX or RX FIFO (8 pipes x 2 = 16 in total) can store 3 packets.

Device FIFO handling

When Gazell is enabled in Device mode, any packets uploaded to a TX FIFO will be transmitted at the next opportunity. If several TX FIFOs contain packets, the various TX FIFOs will be serviced in a round robin fashion, meaning that no TX FIFOs will experience starvation even when packets are continuously being added to other TX FIFOs.

When an ACK is successfully received from a Host, it implies that the payload was successfully received and added to the Host's RX FIFO, the successfully transmitted packet will be removed from the TX FIFO so that the next packet in the FIFO can be transmitted.

If an ACK received by a Device contains a payload, this payload will be added to the pipe's RX FIFO.

If the RX FIFO for a specific pipe on a Device is full and can not accommodate any new packets, no new packets will be sent from the Device on this pipe. In this case, we will never end up in the situation where a payload received in an ACK will have to be discarded due to the pipe's RX FIFO being full.

Host FIFO handling

When Gazell is enabled in Host mode, all enabled pipes (addresses) are simultaneously monitored for incoming packets.

If a new packet not previously added to the pipe's RX FIFO is received, and the pipe's RX FIFO has available space for the packet, the packet will be added to the RX FIFO and an ACK will be sent in return to the Device. If the pipe's TX FIFO contains any packets, the next serviceable packet in the TX FIFO will be attached as a payload in the ACK packet. In order for a TX packet to be attached to an ACK, this TX packet would have to be uploaded to the TX FIFO before the packet is received.

Since the ACK will not always be successfully received by the Device, the data payload added to the ACK will not be removed from the TX FIFO immediately. This TX packet will be removed from the TX FIFO when a new packet (new packet ID or CRC) is received on the same pipe. In this case, the new packet sent from the Device serves as an acknowledgement of the ACK sent previously by the Host. ACKs sent in reply to retransmission attempts contain the same TX payload.

When the Host is handling packets on multiple pipes, care needs to be taken to ensure that ACK payloads in the TX FIFOs on pipes that are no longer in use, are not taking up space in the memory pool and consequently blocking communication on other pipes. To avoid such congestion, the application on the Host can flush the TX FIFOs on the pipes no longer in use.

Callback queueing

Gazell contains an internal callback queue for queueing pending callbacks when Gazell attempts to call a new callback function while the application is already servicing a previously called callback function.

As an example, if a new packet is being received by a Host while the application is already servicing the nrf_gzll_host_rx_data_ready() callback from a previously received packet, the nrf_gzll_host_rx_data_ready() callback for the latest packet will be added to the callback queue and serviced at a later opportunity. In this case, nrf_gzll_host_rx_data_ready() will be called one time for every received packet, and the application does not need to handle the potential race condition scenario where a new packet is being received just before the application is about to exit the nrf_gzll_host_rx_data_ready() function.

Similarly, on a Device the nrf_gzll_device_tx_success() callback will be called one time for every packet receiving an ACK, even when a new packet is receiving an ACK while the application is servicing the nrf_gzll_device_tx_success() callback of a previously transmitted packet.

The size of the callback queue is given by NRF_GZLL_CONST_CALLBACK_QUEUE_LENGTH.

Timeslots

A core parameter in Gazell is the timeslot . The timeslot can be seen as the internal Gazell "heartbeat".

In a Device, any packet transmission (both new packets and retransmitted packets) will start at the start of a timeslot, and only one packet transaction (including ACK) can take place within a timeslot.

gzll_fig2_device_heartbeat.svg
Relation between Device operation and timeslot

Similarly on the Host side, the radio initiates a radio startup at the start of the timeslot to start listening. In addition, it may optionally change the RF channel it listens on.

gzll_fig3_host_heartbeat.svg
Relation between Host operation and timeslot

The period for the heartbeat is set using the nrf_gzll_set_timeslot_period() function.

Frequency hopping

To ensure good coexistence performance with other radio products operating in the same 2.4 GHz frequency band as Gazell, such as Wi-Fi or Bluetooth , Gazell implements mechanisms for hopping between various radio frequency channels.

When enabled, Gazell will pick channels from a predefined channel table.

The contents and size of this channel table can be reconfigured by the application, however the Device and Host must be configured to have the exact same channel table. In total the application can pick from a full channel set of 80 channels when specifying the channel table. Normally, a channel table of 3-7 channels has shown to give a satisfactory coexistence performance in most environments.

Having a too large channel table may increase the transmission latency and power consumption, while using a too small channel table may decrease the coexistence performance.

The core parameters deciding the channel hopping behavior are:

Which one being used depends on whether Gazell is "in sync" or "out of sync" (these terms are described in the Synchronization section). Therefore, we will not differentiate between these two terms and use the term timeslots_per_channel instead.

The timeslots_per_channel parameter decides the number of timeslots Gazell resides on a single channel before the channel is changed. When the next timeslot where a channel shift is performed, Gazell will pick the next channel from the predefined channel table, cycling back to the start of the channel table if required.

gzll_fig4_device_channel_switch.svg
Host and Device channel switching. Here, timeslots_per_channel = 2.

Note: Host channel switching is the same as Device channel switching.

In Device mode, timeslots_per_channel can also be seen as the number of transmission attempts to be spent on each channel before switching channel. This is because there is at most one transmission attempt for every timeslot.

The channel_selection_policy parameter is used by a Device being in sync to decide the initial channel to be used when sending a new packet to a Host (that is, for the first time the new packet is sent, not for the retransmission attempts).

Once synchronized with the Host, the Device can send either on the current channel that it believes the Host is on or on the last successful channel. This can be configured using the nrf_gzll_set_device_channel_selection_policy() .

This channel_selection_policy parameter can take the following two values:

By choosing the NRF_GZLL_DEVICE_CHANNEL_SELECTION_POLICY_USE_SUCCESSFUL policy, the Device will start sending packets on the channel it last had a successfully acknowledged transmission. This policy is the most robust against static interferers as once the Device finds a quiet channel it should be able to continue using this quiet channel.

By choosing the NRF_GZLL_DEVICE_CHANNEL_SELECTION_POLICY_USE_CURRENT policy, the Device sends on the channel it believes the Host is currently listening to. This achieves the lowest latency and highest throughput of the two policies as the Device does not have to wait for the Host to be listening on a specific channel. This policy is frequency hopping. The disadvantage of this policy is that if there is a static interferer on a particular channel, the Device will waste packets attempting to send on this channel. Note that the application can reconfigure the channel table during runtime to overcome this.

As mentioned, the channel selection policy only applies for the initial transmitted packet. If transmission of this initial packet fails, the following retransmission attempts will always be sent at the channel the Device believes the Host is monitoring.

If Gazell is "out of sync", Gazell will always start the packet transmission immediately using the previous successful transmission channel. If Gazell has never before transmitted a successful packet and thus has no "previous successful channel" to relate to, Gazell will start using the first channel in the channel table.

Synchronization

The internal timeslot, or "heartbeat", mechanism of Gazell is used to obtain synchronous communication while still enabling efficient channel switching. This mechanism is useful when a Device needs to switch to a new channel in the case when radio interference is being experienced on the current channel.

Each Gazell Device has two synchronization states: "in sync" and "out of sync".

On the Host, the internal "heartbeat" timer will always be running when Gazell is enabled, independent of the Devices' synchronization state.

On the Device, the "heartbeat" timer will only run as long as the Device is "in sync" or as long as there are packets to be sent. If the timer has been stopped and packets are added to a TX FIFO, the timer will be started immediately.

Before any packets have been successfully received and acknowledged, the Device is out of sync. In this state, the Device switches channel determined by the timeslots_per_channel_when_device_out_of_sync . The Device switches channel at a slower rate than the Host (as determined by timeslots_per_channel ) so that the Device will eventually transmit a packet on the same channel that the Host is on.

When a Device successfully transmits a packet, that is when an ACK packet is received from the Host, the Device will enter "in sync" state, as it now has the information needed for continuing to "guess" the following channels the Host will be listening to.

For knowing when to change channel, Gazell has an internal timeslot_counter to count the number of timeslots Gazell resides on a single channel. When this counter reaches timeslots_per_channel , the timeslot_counter is reset and the channel_index is incremented (cyclically). When an ACK is received, the Device knows the current channel being used by the Host, but it can not know the timeslot_counter state on the Host. As a result, it is only for the timeslots where the timeslot_counter equals zero a Device can be confident that it "guesses" the correct channel that a Host is monitoring. Therefore, when an ACK is received, the timeslot_counter for the current timeslot is reset to 0, and a new Device transmission start when the timeslot_index counter on the Device is zero. Retransmission attempts, however, are sent on all timeslots

Once the Device is in sync it will keep an internal timer running in order to maintain the internal heartbeat in order to remain synchronized with the Host. The duration that the Device will stay in the in sync state is the sync_lifetime and is measured in timeslots. The sync_lifetime is reset whenever a packet is received. Once the sync_lifetime has expired on a Device, the internal timer is stopped and the Device returns to out of sync behavior.

Note that, whenever a Device that is "in sync" sends a packet but does not receive an ACK it will continue transmitting maximum number of transmit attempts are reached.

By setting the sync_lifetime to zero, the Device will never be in sync. The sync_lifetime should be chosen with regard to how often packets are required to be sent and the fact that synchronization can only be maintained for a finite time due to clock drift and radio interference. The sync lifetime is configured using nrf_gzll_set_sync_lifetime() .

The Device can know that sync has been achieved when the number of retransmissions gets close to zero. The nrf_gzll_device_tx_info_t structure is passed to the Device callback functions, and contains the number of transmit attempts required for the current packet. In addition, the nrf_gzll_device_tx_info_t contains the num_channel_switches parameter which can be used by the application to determine whether the RF channels are reliable. This would make it possible for the application to track bad channels and update the channel tables on Host and Device if desired.

Backwards compatibility

The Gazell Link Layer examples are not fully "out of the box" compatible with the legacy Gazell examples provided in the nRFgo SDK for nRF24Lxx devices. The default timeslot period and channel tables require adjustment, as well some setup to emulate the Gazell modes. Note that the Gazell "Low Power Host mode" (Host mode 1) is not supported in the nRF51.

Channel tables

The default channel tables require adjustment.

To change these values:

Timeslot periods

The Gazell Link Layer supports the following minimum timeslot periods.

  • 600us timeslot period, nRF51 Gazell Device to nRF51 Gazell Host.
  • 504us timeslot period, nRF51 Gazell Device to nRF24Lxx Gazell Host.

When using 504 us timeslot period, the following restrictions apply:

  • Max payload size is 17 bytes
  • Max ack payload size is 10 bytes

In addition, the relation between the Device and Host timing parameters should be as follows:

  • The Host listens to each channel in a GZLL_RX_PERIOD number of microseconds, where GZLL_RX_PERIOD is the heartbeat interval in the nRF24Lxx devices.
  • This Host GZLL_RX_PERIOD must be greater than the time required committing 2 full transmission attempts on the Device (including ACK wait time).

To change these values:

  • Edit gzll_params.h file used in the nRF24Lxx projects, or
  • Use the nrf_gzll_set_timeslot_period() function in the nRF51 projects (i.e., nRF51 Gazell timeslot period = 0.5*GZLL_RX_PERIOD).

Emulating legacy Gazell modes

The Gazell Link Layer protocol for the nRF51 Series is compatible with the most useful modes of the Gazell Link Layer for the nRF24Lxx devices.

Emulating legacy nRF24Lxx Gazell Device mode 2 and nRF24Lxx Host mode 0.

The legacy "Device mode 2" can be emulated as follows:

  • The channel selection policy is equivalent to NRF_GZLL_DEVICE_CHANNEL_SELECTION_POLICY_USE_SUCCESSFUL
  • When Gazell is "out of sync" a large number of attempts may occur on each channel before the channel is switched.
  • When Gazell is "in sync", a low number of transmission attempts, typically 2, are allowed on each channel before the channel is switched.

The legacy "Host mode 0" has the following behavior:

  • Host is always on while it is enabled.
  • When enabled, the Host will continuously cycle through the channel table.

This behavior can be obtained the using the code snippet below. Here, we assume we have a channel table my_channel_table[] containing 3 channels.

This can be achieved using the following code snippet on the Device:

/* On Host and Device */
timeslots_per_channel = 2;
channel_table_size = 3;
nrf_gzll_set_timeslot_period (GZLL_RX_PERIOD / 2);
nrf_gzll_set_channel_table (my_channel_table, channel_table_size);
nrf_gzll_set_timeslots_per_channel (timeslots_per_channel);
/* On the Device */
nrf_gzll_set_timeslots_per_channel_when_device_out_of_sync (channel_table_size*timeslots_per_channel);
Page-1 Sheet.611 Sheet.612 Operation Operation Sheet.613 Sheet.614 Sheet.615 Sheet.616 Sync state Sync state Sheet.621 Sheet.622 Sheet.627 Sheet.628 Sheet.629 Sheet.630 Sheet.631 Sheet.632 Sheet.633 Sheet.634 Sheet.638 Sheet.639 Sheet.640 Sheet.641 Heartbeat Heartbeat Rectangle.67 Out of sync Out of sync Rectangle.68 In sync In sync Sheet.644 Sheet.645 Channel index Channel index Sheet.650 Sheet.651 Sheet.652 Sheet.653 Sheet.654 Sheet.655 Sheet.656 Sheet.657 Sheet.658 Sheet.659 Sheet.660 Sheet.661 Sheet.662 Sheet.663 Sheet.664 Sheet.665 Sheet.667 Sheet.671 Sheet.673 Sheet.675 Sheet.682 Sheet.684 Sheet.685 Sheet.693 Sheet.713 Sheet.717 GZLL_RX_PERIOD GZLL_RX_PERIOD Sheet.718 Timeslot Timeslot Sheet.719 Timeslot Timeslot Sheet.720 Heartbeat Heartbeat Sheet.721 Channel index Channel index Sheet.722 Operation Operation Sheet.724 Sheet.725 Sheet.726 Sheet.727 Sheet.728 Sheet.729 Sheet.730 Sheet.731 Sheet.732 Sheet.733 Sheet.734 Sheet.735 Sheet.736 Sheet.737 Sheet.738 Sheet.739 Sheet.740 Sheet.741 Sheet.742 Sheet.743 Sheet.744 Sheet.745 Sheet.746 Sheet.747 Sheet.748 Sheet.749 Sheet.750 Sheet.751 Sheet.752 Sheet.753 Sheet.754 Sheet.755 Sheet.756 Device Device Sheet.757 Host Host Annotation/Comment Sheet.759 Sheet.760 Sheet.761 Sheet.762 Sheet.763 Sheet.764 Sheet.765 Sheet.766 Sheet.767 Sheet.768 Sheet.769 Sheet.770 Sheet.771 Sheet.772 Initial packet and 4 subsequent retransmission attempts fail ... Initial packet and 4 subsequent retransmission attempts fail due to mismatch between Device and Host channels. Annotation/Comment.774 Sheet.775 Sheet.776 Sheet.777 Sheet.778 Sheet.779 Sheet.780 Sheet.781 Sheet.782 Sheet.783 Sheet.784 Sheet.785 Sheet.786 Sheet.787 Sheet.788 When out of sync: timeslots_per_channel = 6 When out of sync: timeslots_per_channel = 6 Annotation/Comment.790 Sheet.791 Sheet.792 Sheet.793 Sheet.794 Sheet.795 Sheet.796 Sheet.797 Sheet.798 Sheet.799 Sheet.800 Sheet.801 Sheet.802 Sheet.803 Sheet.804 Transmission success on 6th transmitted packet as we have Dev... Transmission success on 6th transmitted packet as we have Device and Host channel match on channel index 0. Annotation/Comment.806 Sheet.807 Sheet.808 Sheet.809 Sheet.810 Sheet.811 Sheet.812 Sheet.813 Sheet.814 Sheet.815 Sheet.816 Sheet.817 Sheet.818 Sheet.819 Sheet.820 When in sync: timeslots_per_channel = 2 When in sync: timeslots_per_channel = 2 Annotation/Comment.822 Sheet.823 Sheet.824 Sheet.825 Sheet.826 Sheet.827 Sheet.828 Sheet.829 Sheet.830 Sheet.831 Sheet.832 Sheet.833 Sheet.834 Sheet.835 Sheet.836 Send new packet. Transmission fails due to channel index 0 be... Send new packet. Transmission fails due to channel index 0 being corrupted. Annotation/Comment.838 Sheet.839 Sheet.840 Sheet.841 Sheet.842 Sheet.843 Sheet.844 Sheet.845 Sheet.846 Sheet.847 Sheet.848 Sheet.849 Sheet.850 Sheet.851 Sheet.852 Transmission success on channel index 1 Transmission success on channel index 1 s.free Listen Listen s.free.855 Listen Listen s.free.856 s.3 Send packet Send packet s.1 Receive packet Receive packet s.862 s.864 s.866 s.868 s.870 s.872 s.873 s.874 s.875 s.876 s.878 s.880 s.881 s.free.882 Listen Listen s.free.883 Listen Listen s.free.884 Listen Listen s.free.885 s.free.886 s.free.887 s.free.888 s.free.889 s.free.890 s.free.891 s.free.892 s.894 s.free.896 Wait for packet Wait for packet s.2 0 0 s.5 1 1 s.6 2 2 s.900 0 0 s.901 1 1 s.902 1 1 s.903 2 2 s.904 0 0 s.905 1 1 s.906 2 2 s.908 1 1 s.909 0 0 Annotation/Comment.910 Sheet.911 Sheet.912 Sheet.913 Sheet.914 Sheet.915 Sheet.916 Sheet.917 Sheet.918 Sheet.919 Sheet.920 Sheet.921 Sheet.922 Sheet.923 Sheet.924 Device and Host timeslots will never be fully alligned. Device and Host timeslots will never be fully alligned. Annotation/Comment.927 Sheet.928 Sheet.929 Sheet.930 Sheet.931 Sheet.932 Sheet.933 Sheet.934 Sheet.935 Sheet.936 Sheet.937 Sheet.938 Sheet.939 Sheet.940 Sheet.941 Here, we assume that the ”previously successful channel”, whi... Here, we assume that the ”previously successful channel”, which was channel index 0, has been corrupted. s.946
Emulating legacy Gazell

RF Frontend Module control

Note
This feature works only on the nRF52 Series chips.

The Gazell stack is able to automatically control the external PA/LNA module. It allows to configure various control modes: PA and LNA control can be set up independently. It also allows to configure external frontend ramp-up time - the time required to turn on PA or LNA before RADIO transmission/receiving is started.

Frontend Module control (PA and LNA) requires several resources:

  • Timer,
  • four PPI channels,
  • GPIOTE channel and GPIO pin for PA and LNA part.

All of these resources are configured during initialization.

To turn on an external frontend module, perform the following steps:

  1. Choose proper hardware resources.
  2. Define the nrf_gzll_pa_lna_cfg_t configuration structure. It must remain in memory as long as PA/LNA control is used.
  3. Fill in the configuration structure.
  4. Call nrf_gzll_init to initialize Gazell.
  5. Call the nrf_gzll_set_pa_lna_cfg function. This is done because PA/LNA control must be set up before the Gazell stack is enabled.

Transmission statistics

The Gazell stack allows to automatically gather transmission information, such as:

  • total number of transmitted packets,
  • total number of transmission timeouts,
  • number of transmitted packets per RF channel,
  • number of transmission failures per RF channel.

It also has the capability to track packet transaction failure events, such as transmission timeout or receiving a packet with incorrect CRC.

To turn on transmission statistics, perform the following steps:

  1. Define the nrf_gzll_tx_statistics_t structure. This is a buffer for transmission statistics data so it must remain in memory as long as transmission statistics are used.
  2. Call nrf_gzll_init to initialize Gazell.
  3. Call the nrf_gzll_tx_statistics_enable function to enable transmission information gathering.

After that, transmission statistics can be read from the defined structure. To reset recording, call the nrf_gzll_reset_tx_statistics function.

To track packet transaction failures, perform the following steps:

After that, each transmission timeout and received packet CRC failure will be reported by the respective callback.