Skip to content

Commit

Permalink
gzll: Add the Gazell Link Layer library
Browse files Browse the repository at this point in the history
Add the Gazell Link Layer library for nRF52 Series.

Signed-off-by: Bernard Lee <[email protected]>
  • Loading branch information
leewkb4567 authored and carlescufi committed Oct 27, 2021
1 parent 8c79698 commit 20a5be6
Show file tree
Hide file tree
Showing 22 changed files with 1,331 additions and 0 deletions.
1 change: 1 addition & 0 deletions .checkpatch.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
--exclude zboss
--exclude crypto
--exclude nrf_security
--exclude gzll
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ add_subdirectory_ifdef(CONFIG_BT softdevice_controller)
add_subdirectory_ifdef(CONFIG_NET_L2_OPENTHREAD openthread)
add_subdirectory_ifdef(CONFIG_NRF_RPC nrf_rpc)
add_subdirectory_ifdef(CONFIG_ZIGBEE zboss)
add_subdirectory_ifdef(CONFIG_GZLL gzll)
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ doc/* @b-gent
/softdevice_controller/ @rugeGerritsen
/nrf_modem/ @rlubos @lemrey @evenl
/crypto/ @frkv @tejlmand
/gzll/ @leewkb4567
/mpsl/ @rugeGerritsen
/nfc/ @anangl @grochu
/nrf_802154/ @czeslawmakarski
Expand Down
1 change: 1 addition & 0 deletions Kconfig.nrfxlib
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ rsource "nrf_rpc/Kconfig"
rsource "zboss/Kconfig"
rsource "openthread/Kconfig"
rsource "nrf_802154/zephyr/Kconfig.nrfxlib"
rsource "gzll/Kconfig"

endmenu
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Refer to their respective documentation for more information.
:caption: Contents:

crypto/README
gzll/README
nrf_modem/README
mpsl/README
nrf_802154/README
Expand Down
43 changes: 43 additions & 0 deletions gzll/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# Copyright (c) 2021 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

include(${NRFXLIB_DIR}/common.cmake)

nrfxlib_calculate_lib_path(lib_path)

set(GZLL_LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${lib_path})

if(NOT EXISTS ${GZLL_LIB_PATH})
message(WARNING "This combination of SoC and floating point ABI is not supported by the gzll lib."
"(${GZLL_LIB_PATH} doesn't exist.)")
endif()

zephyr_include_directories(include)

if(CONFIG_SOC_NRF52832)
set(GZLL_LIB_VARIANT nrf52)
elseif(CONFIG_SOC_NRF52810)
set(GZLL_LIB_VARIANT nrf52810)
elseif(CONFIG_SOC_NRF52811)
set(GZLL_LIB_VARIANT nrf52811)
elseif(CONFIG_SOC_NRF52820)
set(GZLL_LIB_VARIANT nrf52820)
elseif(CONFIG_SOC_NRF52833)
set(GZLL_LIB_VARIANT nrf52833)
elseif(CONFIG_SOC_NRF52840)
set(GZLL_LIB_VARIANT nrf52840)
else()
set(GZLL_LIB_VARIANT nrf5x)
endif()

set(GZLL_LIB ${GZLL_LIB_PATH}/libgzll_${GZLL_LIB_VARIANT}.a)

if(NOT EXISTS ${GZLL_LIB})
message(WARNING "SoC is not supported by the gzll lib. "
"(${GZLL_LIB} doesn't exist.)")
endif()

zephyr_link_libraries(${GZLL_LIB})
9 changes: 9 additions & 0 deletions gzll/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2021 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config GZLL
bool "Enable Gazell Link Layer"
depends on SOC_SERIES_NRF52X
15 changes: 15 additions & 0 deletions gzll/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. _gzll:

Gazell Link Layer
#################

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.

The Gazell Link Layer library is available as soft-float and hard-float builds for the nRF52 Series.

.. toctree::
:maxdepth: 2
:caption: Subpages:

doc/integration_notes
doc/api
26 changes: 26 additions & 0 deletions gzll/doc/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _gzll_api:

API documentation
#################

.. contents::
:local:
:depth: 2

.. doxygengroup:: gzll_api
:project: nrfxlib
:members:

Constants
*********

.. doxygengroup:: gzll_constants
:project: nrfxlib
:members:

Glue layer
**********

.. doxygengroup:: gzll_glue
:project: nrfxlib
:members:
71 changes: 71 additions & 0 deletions gzll/doc/integration_notes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. _gzll_integration_notes:

Integration notes
#################

.. contents::
:local:
:depth: 2

RTOS
****

Gazell Link Layer API is not reentrant.
It should be called by only a single thread in an RTOS.

Glue layer
**********

The glue layer lets you to select the hardware resources for Gazell.

Radio
=====

Gazell accesses directly the nRF5 radio peripheral.

When nRF5 radio makes an interrupt request, the glue function :c:func:`nrf_gzll_radio_irq_handler` needs to be called for Gazell processing.

Timer
=====

Gazell requires a timer peripheral for timing purposes.
It accesses directly the timer instance provided by the :c:var:`nrf_gzll_timer` variable.
It consults the :c:var:`nrf_gzll_timer_irqn` variable for the interrupt number of the timer.

When nRF5 timer makes an interrupt request, the glue function :c:func:`nrf_gzll_timer_irq_handler` needs to be called for Gazell processing.

Software interrupt
==================

Gazell consults the :c:var:`nrf_gzll_swi_irqn` variable for the software interrupt number to use.

When nRF5 software interrupt is triggered, the glue function :c:func:`nrf_gzll_swi_irq_handler` needs to be called for Gazell processing.

PPI channels
============

Gazell takes three PPI channels.
It consults the following variables for the PPI channel numbers, event end points (EEP) and task end points (TEP):

* :c:var:`nrf_gzll_ppi_eep0`
* :c:var:`nrf_gzll_ppi_tep0`
* :c:var:`nrf_gzll_ppi_eep1`
* :c:var:`nrf_gzll_ppi_tep1`
* :c:var:`nrf_gzll_ppi_eep2`
* :c:var:`nrf_gzll_ppi_tep2`
* :c:var:`nrf_gzll_ppi_chen_msk_0_and_1`
* :c:var:`nrf_gzll_ppi_chen_msk_2`

High frequency clock
====================

You can configure Gazell to automatically switch on and off the high frequency oscillator (:c:enumerator:`NRF_GZLL_XOSC_CTL_AUTO`).
It calls the following glue functions for high frequency clock requests:

* :c:func:`nrf_gzll_request_xosc`
* :c:func:`nrf_gzll_release_xosc`

Microseconds delay
==================

Gazell calls the glue function :c:func:`nrf_gzll_delay_us` to delay a number of microseconds.
Loading

0 comments on commit 20a5be6

Please sign in to comment.