forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple dect sample. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
- Loading branch information
1 parent
3190fa5
commit 4eb86e9
Showing
8 changed files
with
756 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(dect_phy_simple) | ||
|
||
FILE(GLOB app_sources src/main.c) | ||
target_sources(app PRIVATE ${app_sources}) |
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,42 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
config CARRIER | ||
int "Carrier to use" | ||
default 1677 #during development, remove default from sample so cutomer must address it?- | ||
help | ||
The availability of the channels and the exact regulation to use them varies in different countries. | ||
See ETSI TS 103 636-2 5.4.2 for the calculation. | ||
|
||
config MCS | ||
int | ||
default 1 | ||
help | ||
The MCS impacts how much data can be fit into subslots/slots. | ||
This is now hardcoded assuming MCS 1. | ||
|
||
config TX_POWER | ||
int "Transmission power" | ||
range 0 11 | ||
default 1 | ||
help | ||
TX power, 11 == 19 dBm, maximum of the HW(!) | ||
|
||
config TX_INTERVAL_SECONDS | ||
int "Transmission interval in seconds" | ||
default 5 | ||
|
||
config TX_TRANSMISSION_CYCLES_BEFORE_EXIT | ||
int "Number of transmissions lost before receiver device times out" | ||
default 3 | ||
|
||
module = DECT_PHY_SIMPLE | ||
module-str = DECT NR+ PHY simple sample | ||
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" | ||
|
||
menu "Zephyr Kernel" | ||
source "Kconfig.zephyr" | ||
endmenu |
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,95 @@ | ||
.. _nrf_modem_dect_phy_simple: | ||
|
||
nRF91x1: DECT NR+ PHY simple sample | ||
################################### | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 2 | ||
|
||
This sample demonstrates how to set up a simple DECT NR+ application with the DECT PHY modem firmware. | ||
|
||
.. important:: | ||
|
||
DECT NR+ operates on free but regulated radio channels. The availability of the channels and the exact regulation to use them varies in different countries. | ||
It is the responsibility of the developer to operate the devices according to the local regulation, at development site and at the installation locations of the devices. | ||
|
||
Requirements | ||
************ | ||
|
||
The sample needs at least two nRF91x1 Development Kits. | ||
|
||
See :ref:`nrf91x1_ug_intro` for more details. | ||
|
||
.. note:: | ||
|
||
The :ref:`nrf_modem_dect_phy_simple` require a special modem firmware to run on the nRF91x1 modem core. Please contact our sales department to know more. | ||
|
||
|
||
.. include:: /includes/tfm.txt | ||
|
||
Overview | ||
******** | ||
|
||
The sample shows a simple broadcast of DECT NR+ messages from one device that is received on other devices. | ||
|
||
During initialization the devices listens on a hard-coded channel for another device that is broadcasting messages. | ||
Dependent on the detection of messages, the device takes one of the following roles: | ||
|
||
* If no transmission is detected, the device takes the role as a tranceiver. In this role, the device sends an incrementing counter value on the hard-coded channel. The period between each transmission is decided by the :kconfig:option:`CONFIG_TX_INTERVAL_SECONDS` Kconfig option. | ||
* If a transmission is detected, the device takes the role as a receiver. In this role, the device will listen for incomming messages. | ||
Comparing the counter value with the previous, it can detect if one or more messages were lost in transmission. | ||
|
||
The device will exit the sample if the user presses button 1, ``exit`` is entered in the terminal or if an irrecoverable error occurs. | ||
A device in the receiving role will also exit if no message is received within a given number of transmission cycles, see :kconfig:option:`CONFIG_TX_TRANSMISSION_CYCLES_BEFORE_EXIT. | ||
Upon exit, devices in the receiving role will print a simple statistics. | ||
Each device can be reset to run the sample again. | ||
TX Mode: led 1 on, led 2 blinks | ||
RX mode: led 1 off, led 2 blinks | ||
User interface | ||
*************** | ||
Button 1: | ||
Exits the sample. | ||
Building and running | ||
******************** | ||
.. |sample path| replace:: :file:`samples/modem_trace_flash` | ||
|
||
.. include:: /includes/build_and_run_ns.txt | ||
|
||
Testing | ||
======= | ||
|
||
|test_sample| | ||
|
||
After programming the sample to your development kits, test it by performing the following steps: | ||
|
||
#. |connect_kit| | ||
#. |connect_terminal| | ||
#. Observe that the device will start listening for incomming data. If data is received, the device will take the receiver role, if not the device will take the transmitter role. | ||
#. Observe that the transmitter device will transmit a counter value that is received by the other devices. | ||
#. Press button 1 on the transmitter device. Observe that the device stops transmitting, and the other devices stop receiving. | ||
#. After some time, observe that the receiver devices prints the simple statistics and exit the sample. | ||
|
||
|
||
Dependencies | ||
************ | ||
|
||
It uses the following `sdk-nrfxlib`_ libraries: | ||
|
||
* :ref:`nrfxlib:nrf_modem` | ||
|
||
It uses the following Zephyr libraries: | ||
|
||
* :ref:`zephyr:uart_api` | ||
|
||
|
||
In addition, it uses the following secure firmware components: | ||
|
||
* :ref:`Trusted Firmware-M <ug_tfm>` |
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 @@ | ||
CONFIG_DK_LIBRARY=y | ||
CONFIG_LOG=y | ||
|
||
CONFIG_MODEM_ANTENNA_AT_MAGPIO="" | ||
CONFIG_MODEM_ANTENNA_AT_COEX0="" | ||
|
||
CONFIG_NRF_MODEM_LIB=y | ||
|
||
CONFIG_NRF_MODEM_LINK_BINARY_DECT_PHY=y |
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 @@ | ||
sample: | ||
name: Modem trace flash | ||
tests: | ||
sample.nrf9160.modem_trace_flash: | ||
build_only: true | ||
integration_platforms: | ||
- nrf9160dk_nrf9160_ns | ||
platform_allow: nrf9160dk_nrf9160_ns | ||
tags: ci_build |
Oops, something went wrong.