forked from nrfconnect/sdk-nrfxlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gzll: Add the Gazell Link Layer library
Add the Gazell Link Layer library for nRF52 Series. Signed-off-by: Bernard Lee <[email protected]>
- Loading branch information
1 parent
8c79698
commit 20a5be6
Showing
22 changed files
with
1,331 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,4 @@ | |
--exclude zboss | ||
--exclude crypto | ||
--exclude nrf_security | ||
--exclude gzll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.