Skip to content

Commit a03612b

Browse files
committed
samples: Add support for nRF54L
Update NCS version and add nRF54L support. Signed-off-by: Marcin Gasiorek <[email protected]>
1 parent ba92fa3 commit a03612b

File tree

186 files changed

+4682
-2061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+4682
-2061
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if(CONFIG_RADIO_LR11XX)
1919
message( STATUS "patch needs to be applied? ret=" ${ret})
2020
Set(script_name ${CMAKE_CURRENT_SOURCE_DIR}/scripts/patch_ng.py)
2121
Set(args "-p 1")
22-
Set(pfile ${CMAKE_CURRENT_SOURCE_DIR}/v261_nRF52840_sidewalk_lr11xx.diff)
22+
Set(pfile ${CMAKE_CURRENT_SOURCE_DIR}/v270_sidewalk_lr11xx.diff)
2323
execute_process(
2424
COMMAND ${Python3_EXECUTABLE} ${script_name} ${args} ${pfile}
2525
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../sidewalk

README.md

+34-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# SWSD006 - LR11xx Multi-stack Software Development Kit for nRF52840
1+
# SWSD006 - LR11xx Multi-stack Software Development Kit for nRF52840 & nRF54L15
22

33
SWSD006 is a collection of driver, protocol stack and utility software that facilitates development of Sidewalk
44
applications. The software includes numerous examples of how to leverage the unique capabilities of Semtech's LR11xx silicon.
5-
While the software targets the Nordic nRF52840 MCU, it is designed and distributed as a "full-source" offering, it enables users to modify
5+
While the software targets the Nordic SoC, it is designed and distributed as a "full-source" offering, it enables users to modify
66
the contents across multiple layers of software stack. Potential modifications include re-targeting of host MCU and LR11xx silicon,
77
changes to the platform abstraction layer and enhancement of the packet fragmentation scheme.
88
Please note that while software enhancement is enabled and encouraged, validation of described functionality was exclusively performed on the specified silicon variants and software component versions.
@@ -11,7 +11,7 @@ This repository implements the following functionality:
1111
- LR11xx transceiver silicon support for Sidewalk MAC v1.16 CSS and FSK modulation
1212
- Drivers and examples demonstrating WIFI/GNSS NAV3 geolocation features of LR11xx silicon
1313
- LoRaWAN Class A multi-stack operation using SWL2001 - LoRa Basics Modem 4.5.0; programmatic control over both LoRaWAN and Sidewalk stacks in one firmware image
14-
- LR11xx transceiver firmware upgrade via SWTL001 port to nRF52840
14+
- LR11xx transceiver firmware upgrade via SWTL001 port to nRF52840 (or nRF54L15)
1515
- LoRaWAN Class A + WIFI/GNSS NAV3 operation example
1616
- An example of packet fragmentation and re-assembly (overcomes CSS packet size limitations in Sidewalk)
1717
- AWS lambda example code demonstrating End-to-End handling of LoRa EDGE application data: from transceiver to cloud service
@@ -39,6 +39,7 @@ west init -m https://github.com/Lora-net/SWSD006 --mr v2.6.1 my-workspace
3939
# update nRF Connect SDK modules
4040
cd my-workspace
4141
west update
42+
west config build.sysbuild True
4243
```
4344
If you intend to build a LoRa Basics Modem project on the windows platform, decide on a workspace location as near the root directory as possible in order to prevent path lengths that exceed the capability of the zephyr build system on windows. This is not a concern on other platforms such as linux.
4445
### configuring project for LR11xx
@@ -55,7 +56,34 @@ LR1121 device would typically be used with an XTAL, since it doesnt have GNSS fu
5556
All radio other configuration is declared in ``app_subGHz_config_lr11xx.c``, For example if you wanted to use the radio's LDO instead of it's DC-DC, you can modify the ``.regulator_mode = `` to ``LR11XX_SYSTEM_REG_MODE_LDO``
5657
### Available example applications:
5758
all example apps are built using ``west build -b <board> -- -DOVERLAY_CONFIG=foobar.conf``. The app to build is selected by adding ``-- -DOVERLAY_CONFIG=foobar.conf``
58-
* the full build command, for example: ``west build -b nrf52840dk_nrf52840 -- -DOVERLAY_CONFIG=overlay-nav3sid.conf``
59+
* the full build command, for example:
60+
| Hardware platforms | Board name | Build command |
61+
| -------------- | ---------- | -------------- |
62+
| nRF52840 DK | nrf52840dk | ``west build -p -b nrf52840dk/nrf52840 -- -DOVERLAY_CONFIG=overlay-nav3sid.conf`` |
63+
| nRF54L15 PDK | nrf54l15pdk | ``west build -p -b nrf54l15pdk/nrf54l15/cpuapp -- -DOVERLAY_CONFIG=overlay-nav3sid.conf`` |
64+
65+
#### nRF54L15 PDK pinout:
66+
For nRF54L15 PDK revision v0.3.0/0.7.0 use the following GPIO configuration:
67+
68+
| nRF54L15 PDK | LR1110MB1LCKS |
69+
| -------------- | ---------- |
70+
| P2.06 | SCK |
71+
| P1.11 | MISO |
72+
| P2.08 | MOSI |
73+
| P2.10 | CS |
74+
| P0.02 | LR_NRESET |
75+
| P0.00 | BUSY |
76+
| P0.01 | ACC_INT1 |
77+
| P0.03 | DIO9 |
78+
| P1.12 | LNA_CTRL_MCU |
79+
80+
> **NOTE**
81+
>
82+
> To use the suggested pins, disable ``VCOM0`` (not used by samples) through the [Board Configurator](https://docs.nordicsemi.com/bundle/nrf-connect-board-configurator/page/index.html) tool in the nRF Connect for Desktop.
83+
> This step is required for the shield to work as some pins are connected to ``VCOM0`` by default.
84+
> See the picture below for ``VCOM0`` suggested configuration:
85+
> ![VCOM0 configuration](./pics/board_configurator_nrf54l15_0_3_0.png)
86+
5987
#### apps provided by Nordic:
6088
from the directory ``samples/sid_end_device`` enables LR11xx in ``prj.conf`` -->
6189
* hello
@@ -71,10 +99,11 @@ from the directory ``samples/lbm_sid_end_device`` -->
7199
* NAV3 running simultanously with sidewalk (aka NAV3 in bypass mode):
72100
* ``-DOVERLAY_CONFIG=overlay-nav3sid.conf``
73101
* NAV3 running in lora basics modem:
74-
* `-DOVERLAY_CONFIG=overlay-nav3lbm.conf``
102+
* ``-DOVERLAY_CONFIG=overlay-nav3lbm.conf``
75103
* LR11xx firmware update, and almanac erase:
76104
* build in ``samples/SWTL001``directory
77105

106+
78107
## GNSS Performance Evaluation Notice
79108

80109
The included GNSS example source code is provided solely to demonstrate the GNSS scan functionality under ideal conditions. The source code and GNSS scan results are not representative of the optimal configuration or performance characteristics of the silicon. The LR11xx product family is flexible and can be embodied and configured in a multitude of ways to realize various trade-offs regarding performance, battery life, PCB size, cost, etc. The GNSS example included in this release and the corresponding evaluation kits are designed & configured by the included source code in a default capacity which is sufficient to demonstrate functional GNSS scan capability only. Care must be taken if/when attempting to assess performance characteristics of GNSS scan functionality and we strongly encourage those conducting such analysis to contact Semtech via the provided support channels so that we can ensure appropriate configuration settings are employed for a given performance evaluation use-case.
117 KB
Loading

samples/SWTL001/CMakeLists.txt

+11-23
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,6 @@
66

77
cmake_minimum_required(VERSION 3.20.0)
88

9-
# Sidewalk version
10-
include(bootloader_version.cmake)
11-
12-
# Child images
13-
set(hci_ipc_KCONFIG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/child_image/hci_ipc/Kconfig.root)
14-
set(mcuboot_KCONFIG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/child_image/mcuboot/Kconfig.root)
15-
16-
# Configurations
17-
if(CONF_FILE)
18-
get_filename_component(CONFIG_FILE_NAME ${CONF_FILE} NAME)
19-
endif()
20-
21-
if("${CONFIG_FILE_NAME}" STREQUAL "prj_no_dfu.conf")
22-
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/pm_static_no_dfu.yml)
23-
else()
24-
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
25-
endif()
26-
279
# Zephyr CMake project
2810
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
2911
project(sidewalk_sid_end_device)
@@ -34,25 +16,31 @@ target_sources(app PRIVATE
3416
src/main.c
3517
)
3618

19+
target_sources_ifdef(CONFIG_SIDEWALK_FILE_TRANSFER app PRIVATE
20+
src/sbdt/file_transfer.c
21+
src/sbdt/scratch_buffer.c
22+
)
23+
3724
if(CONFIG_SID_END_DEVICE_SWTL001)
3825
target_sources(app PRIVATE
3926
src/swtl001/app.c
40-
src/swtl001/lr11xx_firmware_update.c
27+
src/swtl001/lr11xx_firmware_update.c
4128
)
4229
else()
43-
message(SEND_ERROR "only swtl001")
30+
message(SEND_ERROR "only swtl001")
4431
endif()
4532

4633
if(CONFIG_SID_END_DEVICE_CLI)
4734
target_sources(app PRIVATE
4835
src/cli/app_dut.c
4936
src/cli/app_shell.c
5037
)
38+
target_sources_ifdef(CONFIG_SIDEWALK_ON_DEV_CERT app PRIVATE src/cli/sid_on_dev_cert_cli.c)
5139
endif()
5240

5341
if(CONFIG_SMTC_CLI)
5442
target_sources(app PRIVATE
55-
src/cli/smtc_shell.c
56-
)
57-
target_compile_definitions(app PRIVATE CONFIG_SMTC_CLI)
43+
src/cli/smtc_shell.c
44+
)
45+
target_compile_definitions(app PRIVATE CONFIG_SMTC_CLI)
5846
endif()

samples/SWTL001/Kconfig

+53-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,23 @@ config SID_END_DEVICE_SWTL001
1313
bool "LR11xx firmware update application"
1414
endchoice #SID_END_DEVICE
1515

16+
if SID_END_DEVICE_HELLO
17+
18+
config SID_END_DEVICE_ECHO_MSGS
19+
bool "Eable message echo feature"
20+
default y
21+
help
22+
Echo received messages back to Sidewlak cloud.
23+
Works with GET and SET messages types.
24+
25+
endif #SID_END_DEVICE_HELLO
26+
27+
if SID_END_DEVICE_SENSOR_MONITORING
28+
29+
rsource "Kconfig.sensor_monitoring"
30+
31+
endif #SID_END_DEVICE_SENSOR_MONITORING
32+
1633
config SID_END_DEVICE_CLI
1734
bool "Enable Sidewalk CLI (DUT)"
1835
imply SHELL
@@ -21,10 +38,10 @@ config SID_END_DEVICE_CLI
2138
The interface commands are compatilbe with former dut sample.
2239

2340
config SMTC_CLI
24-
bool "enable semtech CLI"
25-
imply SHELL
26-
help
27-
Enables semtech radio command line interface.
41+
bool "enable semtech CLI"
42+
imply SHELL
43+
help
44+
Enables semtech radio command line interface.
2845

2946
config SID_END_DEVICE_AUTO_START
3047
default y
@@ -45,6 +62,38 @@ config SID_END_DEVICE_EVENT_HEAP_SIZE
4562
int "Heap for Sidewalk event contexts"
4663
default 2048
4764

65+
config SIDEWALK_FILE_TRANSFER
66+
select EXPERIMENTAL
67+
bool "Enable Sidewalk file transfer"
68+
help
69+
Add support for Sidewalk Bulk Data Transfer (SBDT)
70+
in application.
71+
72+
if SIDEWALK_FILE_TRANSFER
73+
74+
config SIDEWALK_FILE_TRANSFER_HEAP_SIZE
75+
int "Sidewalk file transfer heap size"
76+
default 10240
77+
help
78+
Heap size in bytes to be allocated
79+
for Sidewalk Bulk Data Transfer (SBDT).
80+
81+
config SIDEWALK_FILE_TRANSFER_DFU
82+
bool "Sildewak file transfer and dfu"
83+
default SIDEWALK_FILE_TRANSFER
84+
imply SIDEWALK_DFU_IMG_UTILS
85+
imply DFU_MULTI_IMAGE
86+
imply DFU_TARGET
87+
imply DFU_TARGET_MCUBOOT
88+
imply STREAM_FLASH
89+
imply STREAM_FLASH_ERASE
90+
imply SIDEWALK_THREAD_QUEUE_TIMEOUT
91+
help
92+
Save recived data to flash. Expect CBOR manifest.
93+
Autoatically reset device after file transfer.
94+
95+
endif
96+
4897
rsource "Kconfig.defconfig"
4998

5099
source "Kconfig.zephyr"
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#
2+
# Copyright (c) 2022 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
config SID_END_DEVICE_NOTIFY_DATA_PERIOD_MS
8+
int "Notify period of sensor monitoring demo app"
9+
default 10000
10+
11+
config SIDEWALK_THREAD_PRIORITY
12+
default 12
13+
14+
config SID_END_DEVICE_TX_THREAD_PRIORITY
15+
int
16+
default 13
17+
18+
config SID_END_DEVICE_RX_THREAD_PRIORITY
19+
int
20+
default 14
21+
22+
config SID_END_DEVICE_TX_THREAD_STACK_SIZE
23+
int
24+
default 4096
25+
26+
config SID_END_DEVICE_RX_THREAD_STACK_SIZE
27+
int
28+
default 4096
29+
30+
config SID_END_DEVICE_TX_THREAD_QUEUE_SIZE
31+
int
32+
default 10
33+
34+
config SID_END_DEVICE_RX_THREAD_QUEUE_SIZE
35+
int
36+
default 4

samples/SWTL001/Kconfig.sysbuild

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#
2+
# Copyright (c) 2023 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
config NRF_DEFAULT_IPC_RADIO
8+
default y if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP
9+
10+
choice BOOTLOADER
11+
default BOOTLOADER_MCUBOOT
12+
endchoice
13+
14+
if BOOTLOADER_MCUBOOT
15+
16+
config DFU_MULTI_IMAGE_PACKAGE_BUILD
17+
default y
18+
19+
config DFU_MULTI_IMAGE_PACKAGE_APP
20+
default y
21+
22+
if (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP)
23+
24+
config MCUBOOT_UPDATEABLE_IMAGES
25+
default 2
26+
27+
choice MCUBOOT_MODE
28+
default MCUBOOT_MODE_OVERWRITE_ONLY
29+
endchoice
30+
31+
choice BOOT_SIGNATURE_TYPE
32+
default BOOT_SIGNATURE_TYPE_RSA
33+
endchoice
34+
35+
config SECURE_BOOT
36+
default y
37+
38+
config SECURE_BOOT_NETCORE
39+
default y
40+
41+
config NETCORE_APP_UPDATE
42+
default y
43+
44+
config DFU_MULTI_IMAGE_PACKAGE_NET
45+
default y
46+
47+
endif # BOOTLOADER_MCUBOOT
48+
49+
endif # (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP)
50+
51+
config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
52+
default y if BOARD_NRF52840DK_NRF52840 || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP
53+
54+
source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"

samples/SWTL001/boards/nrf52840dk_nrf52840.overlay

+31
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,37 @@ sid_semtech: &spi2 {
1818
};
1919

2020
/{
21+
state_notifier_gpios{
22+
compatible = "gpio-keys";
23+
state_notifier_error: error {
24+
gpios = <&gpio1 0x7 0x0>;
25+
label = "Application state error";
26+
};
27+
state_notifier_dfu: dfu {
28+
gpios = <&gpio1 0x1 0x0>;
29+
label = "Application state dfu";
30+
};
31+
state_notifier_sending: sending {
32+
gpios = <&gpio1 0x3 0x0>;
33+
label = "Application state sending";
34+
};
35+
state_notifier_receiving: receiving {
36+
gpios = <&gpio1 0x2 0x0>;
37+
label = "Application state receiving";
38+
};
39+
};
40+
41+
aliases {
42+
state-notifier-connected = &led0;
43+
state-notifier-time-sync = &led1;
44+
state-notifier-registered = &led2;
45+
state-notifier-working = &led3;
46+
state-notifier-error = &state_notifier_error;
47+
state-notifier-dfu = &state_notifier_dfu;
48+
state-notifier-sending = &state_notifier_sending;
49+
state-notifier-receiving = &state_notifier_receiving;
50+
};
51+
2152
semtech_sx1262_gpios{
2253
compatible = "gpio-keys";
2354
semtech_sx1262_cs: cs {

samples/SWTL001/boards/nrf5340dk_nrf5340_cpuapp.overlay

+31
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,37 @@
2020
};
2121

2222
/{
23+
state_notifier_gpios{
24+
compatible = "gpio-keys";
25+
state_notifier_error: error {
26+
gpios = <&gpio1 0x8 0x0>;
27+
label = "Application state error";
28+
};
29+
state_notifier_dfu: dfu {
30+
gpios = <&gpio1 0x2 0x0>;
31+
label = "Application state dfu";
32+
};
33+
state_notifier_sending: sending {
34+
gpios = <&gpio1 0x4 0x0>;
35+
label = "Application state sending";
36+
};
37+
state_notifier_receiving: receiving {
38+
gpios = <&gpio1 0x3 0x0>;
39+
label = "Application state receiving";
40+
};
41+
};
42+
43+
aliases {
44+
state-notifier-connected = &led0;
45+
state-notifier-time-sync = &led1;
46+
state-notifier-registered = &led2;
47+
state-notifier-working = &led3;
48+
state-notifier-error = &state_notifier_error;
49+
state-notifier-dfu = &state_notifier_dfu;
50+
state-notifier-sending = &state_notifier_sending;
51+
state-notifier-receiving = &state_notifier_receiving;
52+
};
53+
2354
semtech_sx1262_gpios{
2455
compatible = "gpio-keys";
2556
semtech_sx1262_cs: cs {

0 commit comments

Comments
 (0)