Skip to content

Commit 364b25f

Browse files
Tschet1rugeGerritsen
authored andcommitted
Samples: Bluetooth: ISO time sync sample on 54h
Port the ISO time sync sample to 54h. This works out of the box and only some additions are needed to the device tree configuration set up the DPPI connection between the GRTC and the LED. Signed-off-by: Jan Müller <[email protected]>
1 parent d126a9c commit 364b25f

File tree

8 files changed

+49
-9
lines changed

8 files changed

+49
-9
lines changed

samples/bluetooth/conn_time_sync/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ Hardware resource usage
102102
=======================
103103

104104
This sample requires fewer hardware resources when it is run on an nRF54 Series device compared to the nRF52 or nRF53 Series devices.
105-
On an nRF54L Series device, only one GRTC channel and PPI channel is needed to set up accurate toggling of an LED.
105+
On an nRF54L Series device, only one GRTC channel and one PPI channel are needed to set up accurate toggling of an LED.
106106
On an nRF54H Series device, two local DPPI channels are used to connect the GRTC and the LED to the local PPIB instances.
107107
A PPIB channel is used to connect the two PPIB instances.
108-
On nRF52 and nRF53 Series devices, you also need one RTC peripheral, one TIMER peripheral, one EGU channel, three PPI channels, and one PPI group.
108+
On nRF52 and nRF53 Series devices, you need one RTC peripheral, one TIMER peripheral, one EGU channel, four PPI channels, and one PPI group.
109109

110110
User interface
111111
**************

samples/bluetooth/iso_time_sync/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ if (CONFIG_SOC_COMPATIBLE_NRF52X)
3939
target_sources(app PRIVATE src/controller_time_nrf52.c)
4040
elseif (CONFIG_SOC_COMPATIBLE_NRF5340_CPUAPP)
4141
target_sources(app PRIVATE src/controller_time_nrf53_app.c)
42-
elseif (CONFIG_SOC_SERIES_NRF54LX)
43-
target_sources(app PRIVATE src/controller_time_nrf54l.c)
42+
elseif (CONFIG_SOC_SERIES_NRF54LX OR CONFIG_SOC_SERIES_NRF54HX)
43+
target_sources(app PRIVATE src/controller_time_nrf54.c)
4444
else()
4545
MESSAGE(FATAL_ERROR "Unsupported series")
4646
endif()

samples/bluetooth/iso_time_sync/Kconfig.sysbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
88

99
config NRF_DEFAULT_BLUETOOTH
1010
default y
11+
12+
config NETCORE_IPC_RADIO_BT_HCI_IPC
13+
default y

samples/bluetooth/iso_time_sync/README.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ The sample demonstrates the following features:
5252
This allows you to measure the minimal end-to-end latency.
5353

5454
.. note::
55-
This sample requires less hardware resources when it is run on an nRF54L Series device compared to the nRF52 or nRF53 Series devices.
56-
On an nRF54L Series device, only one GRTC channel and PPI channel is needed to set up accurate toggling of an LED.
57-
On nRF52 and nRF53 Series devices, you also need one RTC peripheral, one TIMER peripheral, one EGU channel, three PPI channels, and one PPI group.
55+
This sample requires fewer hardware resources when it is run on an nRF54 Series device compared to the nRF52 or nRF53 Series devices.
56+
57+
* On an nRF54L Series device, only one GRTC channel and one DPPI channel are needed to set up accurate toggling of an LED.
58+
* On an nRF54H Series device, only one GRTC channel and two local DPPI channels are needed to connect the GRTC and the LED to the local PPIB instances.
59+
Additionally, a PPIB channel is used to connect the two PPIB instances.
60+
* On nRF52 and nRF53 Series devices, you need one RTC peripheral, one TIMER peripheral, one EGU channel, four PPI channels, and one PPI group.
5861

5962
Configuration
6063
*************
@@ -209,7 +212,7 @@ The sample code is divided into multiple source files, which makes it easier to
209212
These files allow the application to read the current timestamp and set up a PPI trigger at a given point in time.
210213

211214
The implementation for nRF52 and nRF53 Series devices is implemented by shadowing an RTC peripheral combined with a timer peripheral.
212-
The implementation for nRF54L Series devices uses the GRTC and is simpler to use.
215+
The implementation for nRF54 Series devices uses the GRTC and is simpler to use.
213216

214217
.. group-tab:: nRF54 DKs
215218

@@ -286,7 +289,7 @@ The sample code is divided into multiple source files, which makes it easier to
286289
These files allow the application to read the current timestamp and set up a PPI trigger at a given point in time.
287290

288291
The implementation for nRF52 and nRF53 Series devices is implemented by shadowing an RTC peripheral combined with a timer peripheral.
289-
The implementation for nRF54L Series devices uses the GRTC and is simpler to use.
292+
The implementation for nRF54 Series devices uses the GRTC and is simpler to use.
290293

291294
Building and running
292295
********************
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
CONFIG_BT_RX_STACK_SIZE=2048
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
&dppic130 {
2+
status = "okay";
3+
4+
// Use channel 4 to connect the PPIB to the LED/GPIO
5+
owned-channels = <4>;
6+
sink-channels = <4>;
7+
};
8+
9+
&dppic132 {
10+
status = "okay";
11+
12+
// Use channel 4 to connect the GRTC to the PPIB.
13+
source-channels = < 4 >;
14+
owned-channels = <4>;
15+
};
16+
17+
&grtc {
18+
status = "okay";
19+
20+
// Change channel 6 to be owned by the application (not child)
21+
child-owned-channels = < 0x5>;
22+
// Change channel 6 to be secure
23+
nonsecure-channels = < 0x5>;
24+
owned-channels = < 0x4 0x5 0x6>;
25+
};

samples/bluetooth/iso_time_sync/sample.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ tests:
1212
- nrf54l15dk/nrf54l05/cpuapp
1313
- nrf54l15dk/nrf54l10/cpuapp
1414
- nrf54l15dk/nrf54l15/cpuapp
15+
- nrf54h20dk/nrf54h20/cpuapp
1516
platform_allow:
1617
- nrf52840dk/nrf52840
1718
- nrf52833dk/nrf52833
1819
- nrf5340dk/nrf5340/cpuapp
1920
- nrf54l15dk/nrf54l05/cpuapp
2021
- nrf54l15dk/nrf54l10/cpuapp
2122
- nrf54l15dk/nrf54l15/cpuapp
23+
- nrf54h20dk/nrf54h20/cpuapp
2224
tags: bluetooth ci_build sysbuild

0 commit comments

Comments
 (0)