Skip to content

Commit aba9e70

Browse files
committed
samples: esb: add sample showing PRX concurrent operation with BLE
This sample showcases how to use the ESB protocol concurrently with Bluetooth. It runs the ESB radio in PRX (receiver) mode while simultaneously enabling the BLE LBS (LED Button Service). Ref: NCSDK-35772 Signed-off-by: Marcin Jelinski <[email protected]>
1 parent 70c66bf commit aba9e70

16 files changed

+729
-4
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,14 @@ DECT NR+
206206
Enhanced ShockBurst (ESB)
207207
-------------------------
208208

209-
* Added the :ref:`esb_monitor_mode` feature.
210-
* Added experimental support for the nRF54LV10A SoC in the following samples:
209+
* Added:
210+
211+
* Experimental support for the nRF54LV10A SoC in the following samples:
211212

212-
* :ref:`esb_prx`
213-
* :ref:`esb_ptx`
213+
* :ref:`esb_prx`
214+
* :ref:`esb_ptx`
215+
* The :ref:`esb_monitor_mode` feature.
216+
* The :ref:`esb_prx_ble` sample that demonstrates how to use the ESB protocol in receiver mode concurrently with the Bluetooth LE LBS service.
214217

215218
Gazell
216219
------

samples/esb/esb_prx/README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ FEM support
5757

5858
.. include:: /includes/sample_fem_support.txt
5959

60+
.. _esb_prx_testing:
61+
6062
Testing
6163
=======
6264

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
cmake_minimum_required(VERSION 3.20.0)
7+
8+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
9+
project(esb_prx_ble)
10+
11+
# NORDIC SDK APP START
12+
target_sources(app PRIVATE
13+
src/main.c
14+
)
15+
# NORDIC SDK APP END

samples/esb/esb_prx_ble/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
source "Kconfig.zephyr"
8+
9+
menu "Enhanced ShockBurst: Receiver BLE"
10+
11+
module = ESB_PRX_BLE
12+
module-str = "ESB_PRX_BLE"
13+
source "$(ZEPHYR_BASE)/subsys/logging/Kconfig.template.log_config"
14+
15+
endmenu
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source "share/sysbuild/Kconfig"
2+
3+
config NRF_DEFAULT_EMPTY
4+
default y if SOC_SERIES_NRF53X

samples/esb/esb_prx_ble/README.rst

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
.. _esb_prx_ble:
2+
3+
Enhanced ShockBurst: Receiver with Bluetooth LE
4+
################################################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
The sample shows how to use the :ref:`ug_esb` protocol in receiver mode concurrently with Bluetooth® LE protocol.
11+
It demonstrates how to configure the Enhanced ShockBurst protocol to receive packets while simultaneously running Bluetooth LE services.
12+
13+
Requirements
14+
************
15+
16+
The sample supports the following development kits:
17+
18+
.. table-from-sample-yaml::
19+
20+
Additionally, if you want to test the Enhanced ShockBurst Transmitter functionality, you need to build and run the :ref:`esb_ptx` sample.
21+
You can use any two of the listed development kits and mix different development kits.
22+
23+
Overview
24+
********
25+
26+
The sample consists of one Receiver that uses the :ref:`esb_README` library in combination with Bluetooth LE functionality.
27+
After building and programming the sample on a development kit, you can test that packets that are sent by the kit that runs the :ref:`Transmitter <esb_ptx>` sample are picked up by the kit that runs the Receiver sample.
28+
Successful communication is indicated by LED changes.
29+
30+
The Receiver sample listens for packets and sends an ACK when a packet is received.
31+
If packets are successfully received from the Transmitter, the LED pattern changes every time a packet is received.
32+
33+
The sample demonstrates cooperative operation between ESB and Bluetooth LE protocols using the MPSL (Multiprotocol Service Layer) time slot mechanism.
34+
This mechanism allows both protocols to share radio time without interference.
35+
The sample runs the :ref:`lbs_readme` alongside the ESB receiver functionality, enabling simultaneous wireless communication using both protocols.
36+
37+
User interface
38+
***************
39+
40+
All LEDs:
41+
Indicate that packets are sent or received.
42+
The first four packets turn on the LEDs sequentially.
43+
The next four packets turn them off again in the same order.
44+
45+
.. tabs::
46+
47+
.. group-tab:: nRF52 and nRF53 DKs
48+
49+
LED 1:
50+
Lit when the development kit is connected.
51+
52+
LED 2:
53+
Lit when the development kit is controlled remotely from the connected device.
54+
55+
LED 3 and LED 4:
56+
Indicate that packets are received.
57+
58+
Button 1:
59+
Send a notification with the button state: "pressed" or "released".
60+
61+
.. group-tab:: nRF54 DKs
62+
63+
LED 0:
64+
Lit when the development kit is connected.
65+
66+
LED 1:
67+
Lit when the development kit is controlled remotely from the connected device.
68+
69+
LED 2 and LED 3:
70+
Indicate that packets are received.
71+
72+
Button 0:
73+
Send a notification with the button state: "pressed" or "released".
74+
75+
Configuration
76+
*************
77+
78+
|config|
79+
80+
Building and running
81+
********************
82+
83+
The Receiver sample can be found under :file:`samples/esb/esb_prx_ble` in the |NCS| folder structure.
84+
85+
See :ref:`building` and :ref:`programming` for information about how to build and program the application, respectively.
86+
87+
.. include:: /includes/nRF54H20_erase_UICR.txt
88+
89+
FEM support
90+
===========
91+
92+
.. include:: /includes/sample_fem_support.txt
93+
94+
Testing
95+
=======
96+
97+
This sample combines ESB receiver functionality with Bluetooth LE LBS service, and both protocols can be tested independently.
98+
99+
Testing ESB functionality
100+
-------------------------
101+
102+
To test the ESB receiver functionality, follow the testing procedure described in the :ref:`Testing section of the Enhanced ShockBurst: Receiver <esb_prx_testing>` sample documentation.
103+
In brief, you need to program the Transmitter sample (:ref:`esb_ptx`) on another development kit and observe that the LEDs change synchronously on both kits as packets are transmitted and received.
104+
105+
Testing LBS service
106+
-------------------
107+
108+
To test the Bluetooth LE LBS service functionality, follow the testing procedure described in the :ref:`Testing section of LBS <peripheral_lbs_testing>` sample documentation.
109+
You can use a smartphone or tablet with the `nRF Connect for Mobile`_ or `nRF Blinky`_ application to connect to the device (advertising as ``Nordic_LBS``), control the LED remotely, and receive button press notifications.
110+
111+
Dependencies
112+
************
113+
114+
This sample uses the following |NCS| libraries:
115+
116+
* :ref:`esb_readme`
117+
* :ref:`ug_ble`
118+
* :ref:`mpsl`
119+
* :ref:`lbs_readme`
120+
121+
In addition, it uses the following Zephyr libraries:
122+
123+
* :file:`include/zephyr/types.h`
124+
* :ref:`zephyr:logging_api`
125+
* :ref:`zephyr:kernel_api`:
126+
127+
* :file:`include/kernel.h`
128+
* :file:`include/irq.h`
129+
130+
* :ref:`zephyr:api_peripherals`:
131+
132+
* :file:`include/gpio.h`
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
leds {
9+
compatible = "gpio-leds";
10+
11+
led0: led_0 {
12+
gpios = < &gpio9 0 GPIO_ACTIVE_HIGH >;
13+
label = "Green LED 0";
14+
};
15+
16+
led1: led_1 {
17+
gpios = < &gpio9 1 GPIO_ACTIVE_HIGH >;
18+
label = "Green LED 1";
19+
};
20+
21+
led2: led_2 {
22+
gpios = < &gpio9 2 GPIO_ACTIVE_HIGH >;
23+
label = "Green LED 2";
24+
};
25+
26+
led3: led_3 {
27+
gpios = < &gpio9 3 GPIO_ACTIVE_HIGH >;
28+
label = "Green LED 3";
29+
};
30+
};
31+
32+
aliases {
33+
led0 = &led0;
34+
led1 = &led1;
35+
led2 = &led2;
36+
led3 = &led3;
37+
};
38+
39+
cpurad_cpusys_errata216_mboxes: errata216_mboxes {
40+
compatible = "zephyr,mbox-ipm";
41+
status = "okay";
42+
mboxes = < &cpusys_vevif 0x14 >, < &cpusys_vevif 0x15 >;
43+
mbox-names = "on_req", "off_req";
44+
};
45+
};
46+
47+
&gpio9 {
48+
status = "okay";
49+
};
50+
51+
&gpio0 {
52+
status = "okay";
53+
};
54+
55+
&gpiote130 {
56+
owned-channels = <0 1 2 3 4 5 6 7>;
57+
status = "okay";
58+
};
59+
60+
&dppic020 {
61+
status = "okay";
62+
source-channels = < 0 1 2 3 4 5 >;
63+
sink-channels = < 6 7 8 9 10 11 >;
64+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# Enable DPPI driver
8+
CONFIG_NRFX_DPPI10=y
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# Enable DPPI driver
8+
CONFIG_NRFX_DPPI10=y
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# Enable DPPI driver
8+
CONFIG_NRFX_DPPI10=y

0 commit comments

Comments
 (0)