diff --git a/.github/workflows/common-build_and_run.yml b/.github/workflows/common-build_and_run.yml index c1bf7e4169..770118f2c7 100644 --- a/.github/workflows/common-build_and_run.yml +++ b/.github/workflows/common-build_and_run.yml @@ -11,7 +11,7 @@ on: description: 'platforms to build for' required: false type: string - default: '["nrf52840dk_nrf52840", "nrf5340dk_nrf5340_cpuapp"]' + default: '["nrf52840dk_nrf52840", "nrf5340dk_nrf5340_cpuapp", "nrf54l15pdk_nrf54l15_cpuapp"]' run_tests: description: 'run tests on HW after building' type: boolean diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 989fda8633..9bc9da1fb7 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -5,7 +5,7 @@ # if (CONFIG_SIDEWALK) - if(CONFIG_SOC_SERIES_NRF52X) + if(CONFIG_CPU_CORTEX_M4) add_subdirectory(cortex-m4) else() add_subdirectory(cortex-m33) diff --git a/samples/sid_end_device/CMakeLists.txt b/samples/sid_end_device/CMakeLists.txt index c88c8e7442..6547b78736 100644 --- a/samples/sid_end_device/CMakeLists.txt +++ b/samples/sid_end_device/CMakeLists.txt @@ -19,10 +19,12 @@ if(CONF_FILE) endif() if("${CONFIG_FILE_NAME}" STREQUAL "prj_no_dfu.conf") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/pm_static_no_dfu.yml) + set(PM_FILENAME "pm_static_no_dfu.yml") else() - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) + set(PM_FILENAME "pm_static_dfu.yml") endif() +set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/${PM_FILENAME}) + # Zephyr CMake project find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 0000000000..99f2a4dfc7 --- /dev/null +++ b/samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,13 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Workaround: +# The nRF54L15 PDK (PCA10156) revisions v0.2.0 AA0-ES2, v0.2.0 AA0-ES3, +# and v0.2.1 AB0-ES5 have Buttons 3 and 4 connected to the GPIO port +# which does not support interrupts. +CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y + +CONFIG_SIDEWALK_SUBGHZ_SUPPORT=n diff --git a/samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp_no_dfu.conf b/samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp_no_dfu.conf new file mode 100644 index 0000000000..99f2a4dfc7 --- /dev/null +++ b/samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp_no_dfu.conf @@ -0,0 +1,13 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Workaround: +# The nRF54L15 PDK (PCA10156) revisions v0.2.0 AA0-ES2, v0.2.0 AA0-ES3, +# and v0.2.1 AB0-ES5 have Buttons 3 and 4 connected to the GPIO port +# which does not support interrupts. +CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y + +CONFIG_SIDEWALK_SUBGHZ_SUPPORT=n diff --git a/samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf new file mode 100644 index 0000000000..99f2a4dfc7 --- /dev/null +++ b/samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -0,0 +1,13 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Workaround: +# The nRF54L15 PDK (PCA10156) revisions v0.2.0 AA0-ES2, v0.2.0 AA0-ES3, +# and v0.2.1 AB0-ES5 have Buttons 3 and 4 connected to the GPIO port +# which does not support interrupts. +CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y + +CONFIG_SIDEWALK_SUBGHZ_SUPPORT=n diff --git a/samples/sid_end_device/child_image/mcuboot/Kconfig.root b/samples/sid_end_device/child_image/mcuboot/Kconfig.root index d6ecb28988..94de62b471 100644 --- a/samples/sid_end_device/child_image/mcuboot/Kconfig.root +++ b/samples/sid_end_device/child_image/mcuboot/Kconfig.root @@ -35,14 +35,6 @@ config FLASH config FPROTECT default y -config NORDIC_QSPI_NOR - default y - -config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE - default 4096 - -config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE - default 16 config BOOT_MAX_IMG_SECTORS default 256 diff --git a/samples/sid_end_device/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/sid_end_device/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 0000000000..9d579fa416 --- /dev/null +++ b/samples/sid_end_device/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,15 @@ +# +# Copyright (c) 2021 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +# Ensure that the qspi driver is disabled by default +CONFIG_NORDIC_QSPI_NOR=n + +# Workaroud: fprotect and watchdog feed +# are not supported in NCS v2.6.0 +CONFIG_FPROTECT=n +CONFIG_BOOT_WATCHDOG_FEED=n diff --git a/samples/sid_end_device/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/sid_end_device/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf new file mode 100644 index 0000000000..9d579fa416 --- /dev/null +++ b/samples/sid_end_device/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -0,0 +1,15 @@ +# +# Copyright (c) 2021 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +# Ensure that the qspi driver is disabled by default +CONFIG_NORDIC_QSPI_NOR=n + +# Workaroud: fprotect and watchdog feed +# are not supported in NCS v2.6.0 +CONFIG_FPROTECT=n +CONFIG_BOOT_WATCHDOG_FEED=n diff --git a/samples/sid_end_device/child_image/mcuboot/prj.conf b/samples/sid_end_device/child_image/mcuboot/prj.conf index 78d762258b..015b46e086 100644 --- a/samples/sid_end_device/child_image/mcuboot/prj.conf +++ b/samples/sid_end_device/child_image/mcuboot/prj.conf @@ -5,6 +5,10 @@ CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" +CONFIG_BOOT_ENCRYPT_IMAGE=n +CONFIG_CBPRINTF_NANO=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0 + CONFIG_BOOT_UPGRADE_ONLY=n CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/samples/sid_end_device/child_image/mcuboot/prj_release.conf b/samples/sid_end_device/child_image/mcuboot/prj_release.conf index 78d762258b..015b46e086 100644 --- a/samples/sid_end_device/child_image/mcuboot/prj_release.conf +++ b/samples/sid_end_device/child_image/mcuboot/prj_release.conf @@ -5,6 +5,10 @@ CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" +CONFIG_BOOT_ENCRYPT_IMAGE=n +CONFIG_CBPRINTF_NANO=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0 + CONFIG_BOOT_UPGRADE_ONLY=n CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/samples/sid_end_device/configuration/pm_static_no_dfu.yml b/samples/sid_end_device/configuration/nrf52840dk_nrf52840/pm_static_no_dfu.yml similarity index 100% rename from samples/sid_end_device/configuration/pm_static_no_dfu.yml rename to samples/sid_end_device/configuration/nrf52840dk_nrf52840/pm_static_no_dfu.yml diff --git a/samples/sid_end_device/pm_static.yml b/samples/sid_end_device/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_no_dfu.yml similarity index 52% rename from samples/sid_end_device/pm_static.yml rename to samples/sid_end_device/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_no_dfu.yml index 55dba59b1b..658ce757c1 100644 --- a/samples/sid_end_device/pm_static.yml +++ b/samples/sid_end_device/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_no_dfu.yml @@ -1,8 +1,3 @@ -mcuboot: - address: 0x0 - end_address: 0x8000 - region: flash_primary - size: 0x8000 mfg_storage: address: 0xff000 end_address: 0x100000 diff --git a/samples/sid_end_device/configuration/nrf54l15pdk_nrf54l15_cpuapp/pm_static_dfu.yml b/samples/sid_end_device/configuration/nrf54l15pdk_nrf54l15_cpuapp/pm_static_dfu.yml new file mode 100644 index 0000000000..d012052b69 --- /dev/null +++ b/samples/sid_end_device/configuration/nrf54l15pdk_nrf54l15_cpuapp/pm_static_dfu.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0x17c000 + region: flash_primary + size: 0x1000 diff --git a/samples/sid_end_device/configuration/nrf54l15pdk_nrf54l15_cpuapp/pm_static_no_dfu.yml b/samples/sid_end_device/configuration/nrf54l15pdk_nrf54l15_cpuapp/pm_static_no_dfu.yml new file mode 100644 index 0000000000..d012052b69 --- /dev/null +++ b/samples/sid_end_device/configuration/nrf54l15pdk_nrf54l15_cpuapp/pm_static_no_dfu.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0x17c000 + region: flash_primary + size: 0x1000 diff --git a/samples/sid_end_device/configuration/thingy53_nrf5340_cpuapp/pm_static_no_dfu.yml b/samples/sid_end_device/configuration/thingy53_nrf5340_cpuapp/pm_static_no_dfu.yml new file mode 100644 index 0000000000..658ce757c1 --- /dev/null +++ b/samples/sid_end_device/configuration/thingy53_nrf5340_cpuapp/pm_static_no_dfu.yml @@ -0,0 +1,5 @@ +mfg_storage: + address: 0xff000 + end_address: 0x100000 + region: flash_primary + size: 0x1000 diff --git a/samples/sid_end_device/sample.yaml b/samples/sid_end_device/sample.yaml index a61c19d58d..b4f439d0f9 100644 --- a/samples/sid_end_device/sample.yaml +++ b/samples/sid_end_device/sample.yaml @@ -4,17 +4,24 @@ sample: tests: sample.sidewalk.hello: build_only: true - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp extra_configs: - CONFIG_SID_END_DEVICE_PERSISTENT_LINK_MASK=y integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk hello sample.sidewalk.hello.release: build_only: true - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp extra_args: CONF_FILE=prj_release.conf extra_configs: @@ -22,11 +29,15 @@ tests: integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk hello sample.sidewalk.hello.no_dfu: build_only: true - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp extra_args: CONF_FILE=prj_no_dfu.conf extra_configs: @@ -34,21 +45,29 @@ tests: integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk hello sample.sidewalk.hello.ble_only: build_only: true - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp extra_configs: - CONFIG_SIDEWALK_SUBGHZ_SUPPORT=n integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk hello BLE sample.sidewalk.hello.ble_only.release: build_only: true - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp extra_args: CONF_FILE=prj_release.conf extra_configs: @@ -56,11 +75,15 @@ tests: integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk hello BLE sample.sidewalk.demo: build_only: true - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp extra_args: OVERLAY_CONFIG="overlay-demo.conf" extra_configs: @@ -68,11 +91,16 @@ tests: integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk demo sample.sidewalk.demo.ble_only: build_only: true - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp thingy53_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - thingy53_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp extra_args: OVERLAY_CONFIG="overlay-demo.conf" extra_configs: @@ -81,11 +109,15 @@ tests: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp - thingy53_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk demo BLE sample.sidewalk.dut: build_only: true - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp extra_args: OVERLAY_CONFIG="overlay-dut.conf" extra_configs: @@ -93,4 +125,5 @@ tests: integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk cli diff --git a/scripts/ci/fill_hardware_map.py b/scripts/ci/fill_hardware_map.py index a01ff3800a..961e532abd 100644 --- a/scripts/ci/fill_hardware_map.py +++ b/scripts/ci/fill_hardware_map.py @@ -22,7 +22,7 @@ "PCA10059": "nrf52840dongle_nrf52840", "PCA10095": "nrf5340dk_nrf5340_cpuapp", "PCA20053": "thingy53_nrf5340_cpuapp", - # "PCA10145": "nrf54h20dk_nrf54h20_cpuapp@soc1", + "PCA10156": "nrf54l15pdk_nrf54l15_cpuapp" } family_to_pca = { @@ -32,7 +32,7 @@ "NRF52840DONGLE": "PCA10059", "NRF5340": "PCA10095", "THINGY53": "PCA20053", - # "NRF54H20": "PCA10145" + "NRF54L15": "PCA10156" } @@ -140,6 +140,10 @@ def main(hardware_map_path: str, userdev_conf_path: str): # If newer nRF52 board, remove first serial interface if segger.startswith("1050") and "-if02" in hw_entry["serial"]: to_remove.append(hw_entry) + elif "nrf54l15pdk_nrf54l15_cpuapp" in hw_entry["platform"]: + # If nRF54l board, remove only first serial interface + if segger.startswith("1057") and "-if00" in hw_entry["serial"]: + to_remove.append(hw_entry) else: # HW not known or not connected. Mark for removal to_remove.append(hw_entry) diff --git a/subsys/sal/sid_pal/src/sid_mfg_storage.c b/subsys/sal/sid_pal/src/sid_mfg_storage.c index 2451be2c43..ff2012ec21 100644 --- a/subsys/sal/sid_pal/src/sid_mfg_storage.c +++ b/subsys/sal/sid_pal/src/sid_mfg_storage.c @@ -41,6 +41,8 @@ LOG_MODULE_REGISTER(sid_mfg, CONFIG_SIDEWALK_LOG_LEVEL); #elif defined(NRF_NETWORK) #define DEV_ID_REG (uint32_t)(NRF_FICR_NS->INFO.DEVICEID[0]) #endif /* NRF5340_XXAA */ +#elif defined(NRF54L15_ENGA_XXAA) +#define DEV_ID_REG (uint32_t)(NRF_FICR->INFO.DEVICEID[0]) #else #error "Unknow Device ID register." #endif diff --git a/tests/functional/critical_region/testcase.yaml b/tests/functional/critical_region/testcase.yaml index c204d67738..f79678f416 100644 --- a/tests/functional/critical_region/testcase.yaml +++ b/tests/functional/critical_region/testcase.yaml @@ -1,6 +1,7 @@ tests: sidewalk.functional.critical_region: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/tests/functional/crypto/Kconfig b/tests/functional/crypto/Kconfig index 1bab816a8f..17c05377b3 100644 --- a/tests/functional/crypto/Kconfig +++ b/tests/functional/crypto/Kconfig @@ -25,12 +25,8 @@ config ZTEST_STACK_SIZE config HEAP_MEM_POOL_SIZE default 4096 -config MBEDTLS_ENABLE_HEAP - default y - config MBEDTLS_HEAP_SIZE default 4096 -source "${ZEPHYR_BASE}/../sidewalk/Kconfig" -source "${ZEPHYR_BASE}/../sidewalk/Kconfig.dependencies" source "Kconfig.zephyr" +source "${ZEPHYR_BASE}/../sidewalk/Kconfig.dependencies" diff --git a/tests/functional/crypto/prj.conf b/tests/functional/crypto/prj.conf index 364699b23a..be62f3c8fa 100644 --- a/tests/functional/crypto/prj.conf +++ b/tests/functional/crypto/prj.conf @@ -3,6 +3,6 @@ # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_UNITY=y CONFIG_ZTEST=y CONFIG_MAIN_THREAD_PRIORITY=14 +CONFIG_CONSOLE_PUTCHAR_BUFSIZE=512 diff --git a/tests/functional/crypto/testcase.yaml b/tests/functional/crypto/testcase.yaml index 6e3aae910d..ff69998ae6 100644 --- a/tests/functional/crypto/testcase.yaml +++ b/tests/functional/crypto/testcase.yaml @@ -1,7 +1,8 @@ tests: sidewalk.functional.crypto: tags: Sidewalk - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/tests/functional/interrupts/testcase.yaml b/tests/functional/interrupts/testcase.yaml index 65ff08edd9..1397697ba1 100644 --- a/tests/functional/interrupts/testcase.yaml +++ b/tests/functional/interrupts/testcase.yaml @@ -1,7 +1,8 @@ tests: unity.sidewalk.functional.interrupts: tags: Sidewalk - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/tests/functional/mfg_storage/pm_static.yml b/tests/functional/mfg_storage/pm_static.yml index 86fc7e22f2..38e6c17c13 100644 --- a/tests/functional/mfg_storage/pm_static.yml +++ b/tests/functional/mfg_storage/pm_static.yml @@ -1,8 +1,3 @@ -sidewalk_storage: - address: 0xf9000 - region: flash_primary - size: 0x6000 - mfg_storage: address: 0xff000 region: flash_primary diff --git a/tests/functional/mfg_storage/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/tests/functional/mfg_storage/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 0000000000..d012052b69 --- /dev/null +++ b/tests/functional/mfg_storage/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0x17c000 + region: flash_primary + size: 0x1000 diff --git a/tests/functional/mfg_storage/src/main.c b/tests/functional/mfg_storage/src/main.c index b114d3f612..3ef52c0c62 100644 --- a/tests/functional/mfg_storage/src/main.c +++ b/tests/functional/mfg_storage/src/main.c @@ -24,8 +24,7 @@ * MFG_START_OFFSET = 0x0FF000 * MFG_END_OFFSET = 0x100000 */ -#define MFG_END_OFFSET \ - (FIXED_PARTITION_OFFSET(sidewalk_storage) + FIXED_PARTITION_SIZE(sidewalk_storage)) +#define MFG_END_OFFSET (FIXED_PARTITION_OFFSET(mfg_storage) + FIXED_PARTITION_SIZE(mfg_storage)) #define MFG_START_OFFSET (MFG_END_OFFSET - MFG_STORAGE_SIZE) static uint8_t test_data_buffer[512]; @@ -96,8 +95,8 @@ ZTEST(mfg_storage, test_1sid_pal_mfg_storage_no_init) ZTEST(mfg_storage, test_2sid_pal_mfg_storage_init) { static const sid_pal_mfg_store_region_t mfg_store_region = { - .addr_start = MFG_START_OFFSET, - .addr_end = MFG_END_OFFSET, + .addr_start = PM_MFG_STORAGE_ADDRESS, + .addr_end = PM_MFG_STORAGE_END_ADDRESS, }; sid_pal_mfg_store_init(mfg_store_region); diff --git a/tests/functional/mfg_storage/testcase.yaml b/tests/functional/mfg_storage/testcase.yaml index 75bbd31e85..b1f995e3f9 100644 --- a/tests/functional/mfg_storage/testcase.yaml +++ b/tests/functional/mfg_storage/testcase.yaml @@ -2,7 +2,8 @@ tests: sidewalk.functional.mfg_storage: skip: true tags: Sidewalk - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/tests/functional/pal_delay/testcase.yaml b/tests/functional/pal_delay/testcase.yaml index c8418a6c3f..2856f82468 100644 --- a/tests/functional/pal_delay/testcase.yaml +++ b/tests/functional/pal_delay/testcase.yaml @@ -1,7 +1,8 @@ tests: sidewalk.functional.delay: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk diff --git a/tests/functional/spi_bus/Kconfig b/tests/functional/spi_bus/Kconfig index c28f458838..3c4ce35a2e 100644 --- a/tests/functional/spi_bus/Kconfig +++ b/tests/functional/spi_bus/Kconfig @@ -9,6 +9,13 @@ config SIDEWALK_BUILD config SIDEWALK_SUBGHZ_SUPPORT default y +config SIDEWALK_SUBGHZ_TRIM_CAP_VAL + hex "value for trim cap used by subGHz radio" + range 0x0 0xFFFF + default 0x1212 + help + The value of the trim cap. Default value works for Semtech SX1262 shield + config SIDEWALK_SPI_BUS default y imply SPI @@ -17,7 +24,7 @@ config SIDEWALK_SPI_BUS config SIDEWALK_GPIO default y - imply GPIO + imply GPIO config SIDEWALK_GPIO_IRQ_PRIORITY default 1 diff --git a/tests/functional/spi_bus/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/tests/functional/spi_bus/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay new file mode 100644 index 0000000000..1c1b695be5 --- /dev/null +++ b/tests/functional/spi_bus/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + + + &pinctrl { + spi00_default: spi00_default { + group1 { + psels = , + , + ; + }; + }; + + spi00_sleep: spi00_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; +}; + + sid_semtech: &spi00 { + compatible = "nordic,nrf-spim"; + status = "okay"; + pinctrl-0 = <&spi00_default>; + pinctrl-1 = <&spi00_sleep>; + pinctrl-names = "default", "sleep"; + clock-frequency = ; +}; + +/{ + semtech_sx1262_gpios{ + compatible = "gpio-keys"; + semtech_sx1262_cs: cs { + gpios = <&gpio0 0x5 GPIO_ACTIVE_LOW>; + label = "semtech_sx1262 CS"; + }; + semtech_sx1262_reset_gpios: reset { + gpios = <&gpio0 0x6 GPIO_ACTIVE_LOW>; + label = "semtech_sx1262 Reset"; + }; + semtech_sx1262_busy_gpios: busy { + gpios = <&gpio0 0x7 GPIO_ACTIVE_HIGH>; + label = "semtech_sx1262 Busy"; + }; + semtech_sx1262_antenna_enable_gpios: antena_enable { + gpios = <&gpio0 0x8 GPIO_ACTIVE_HIGH>; + label = "semtech_sx1262 Antena Enable"; + }; + semtech_sx1262_dio1_gpios: dio1 { + gpios = <&gpio0 0x9 GPIO_ACTIVE_HIGH>; + label = "semtech_sx1262 DIO1"; + }; + }; +}; diff --git a/tests/functional/spi_bus/testcase.yaml b/tests/functional/spi_bus/testcase.yaml index 00393609d7..719c238cee 100644 --- a/tests/functional/spi_bus/testcase.yaml +++ b/tests/functional/spi_bus/testcase.yaml @@ -1,9 +1,10 @@ tests: sidewalk.functional.spi_bus: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk harness: ztest harness_config: diff --git a/tests/functional/storage/boards/nrf52840dk_nrf52840.overlay b/tests/functional/storage/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index c60f05e793..0000000000 --- a/tests/functional/storage/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -/* -* Storage partition will be used by NVS -* if enabled. -*/ -&storage_partition{ - reg = <0x000f8000 0x00007000>; -}; - -/* -* Flash partition for the Sidewalk MFG storage. -*/ -&flash0 { - partitions { - sid_mfg_storage_partition: partition@ff000 { - label = "mfg_storage"; - reg = <0x000ff000 0x00001000>; - }; - }; -}; diff --git a/tests/functional/storage/pm_static.yml b/tests/functional/storage/pm_static.yml deleted file mode 100644 index 03d4950266..0000000000 --- a/tests/functional/storage/pm_static.yml +++ /dev/null @@ -1,9 +0,0 @@ -sidewalk_storage: - address: 0xf8000 - region: flash_primary - size: 0x7000 - -mfg_storage: - address: 0xff000 - region: flash_primary - size: 0x1000 diff --git a/tests/functional/storage/prj.conf b/tests/functional/storage/prj.conf index e08e5a9314..364699b23a 100644 --- a/tests/functional/storage/prj.conf +++ b/tests/functional/storage/prj.conf @@ -6,4 +6,3 @@ CONFIG_UNITY=y CONFIG_ZTEST=y CONFIG_MAIN_THREAD_PRIORITY=14 -CONFIG_PARTITION_MANAGER_ENABLED=y diff --git a/tests/functional/storage/testcase.yaml b/tests/functional/storage/testcase.yaml index bab2eb950e..4f916ce7ce 100644 --- a/tests/functional/storage/testcase.yaml +++ b/tests/functional/storage/testcase.yaml @@ -1,7 +1,8 @@ tests: sidewalk.functional.storage: tags: Sidewalk - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/tests/functional/temperature/testcase.yaml b/tests/functional/temperature/testcase.yaml index be3efd969b..eb0055e7b0 100644 --- a/tests/functional/temperature/testcase.yaml +++ b/tests/functional/temperature/testcase.yaml @@ -1,7 +1,11 @@ tests: sidewalk.functional.temperature: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + # - nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + # - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk diff --git a/tests/functional/time/Kconfig b/tests/functional/time/Kconfig index 59add6d00a..94d09aec39 100644 --- a/tests/functional/time/Kconfig +++ b/tests/functional/time/Kconfig @@ -12,7 +12,5 @@ config SIDEWALK_TIMER config SIDEWALK_LOG_LEVEL default 0 - -source "${ZEPHYR_BASE}/../sidewalk/Kconfig" -source "${ZEPHYR_BASE}/../sidewalk/Kconfig.dependencies" source "Kconfig.zephyr" +source "${ZEPHYR_BASE}/../sidewalk/Kconfig.dependencies" diff --git a/tests/functional/time/testcase.yaml b/tests/functional/time/testcase.yaml index 9128b94c54..92dadadd92 100644 --- a/tests/functional/time/testcase.yaml +++ b/tests/functional/time/testcase.yaml @@ -1,7 +1,8 @@ tests: sidewalk.functional.time: tags: Sidewalk - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/tests/manual/ble/pm_static.yml b/tests/manual/ble/pm_static.yml index 03d4950266..38e6c17c13 100644 --- a/tests/manual/ble/pm_static.yml +++ b/tests/manual/ble/pm_static.yml @@ -1,8 +1,3 @@ -sidewalk_storage: - address: 0xf8000 - region: flash_primary - size: 0x7000 - mfg_storage: address: 0xff000 region: flash_primary diff --git a/tests/manual/ble/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/tests/manual/ble/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 0000000000..d012052b69 --- /dev/null +++ b/tests/manual/ble/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0x17c000 + region: flash_primary + size: 0x1000 diff --git a/tests/manual/ble/sample.yaml b/tests/manual/ble/sample.yaml index 1a8647f2af..bab3252f51 100644 --- a/tests/manual/ble/sample.yaml +++ b/tests/manual/ble/sample.yaml @@ -3,9 +3,10 @@ sample: description: Test Bluetooth with controller (e.g. smartphone with nRF Connect App) tests: sidewalk.test.ble: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp build_only: true integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk diff --git a/tests/manual/log/pm_static.yml b/tests/manual/log/pm_static.yml index 03d4950266..38e6c17c13 100644 --- a/tests/manual/log/pm_static.yml +++ b/tests/manual/log/pm_static.yml @@ -1,8 +1,3 @@ -sidewalk_storage: - address: 0xf8000 - region: flash_primary - size: 0x7000 - mfg_storage: address: 0xff000 region: flash_primary diff --git a/tests/manual/log/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/tests/manual/log/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 0000000000..d012052b69 --- /dev/null +++ b/tests/manual/log/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0x17c000 + region: flash_primary + size: 0x1000 diff --git a/tests/manual/log/sample.yaml b/tests/manual/log/sample.yaml index a97a1aea5a..fe438f7e6b 100644 --- a/tests/manual/log/sample.yaml +++ b/tests/manual/log/sample.yaml @@ -3,9 +3,10 @@ sample: description: Test printing different sidewalk logs tests: sidewalk.test.log: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp build_only: true integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk diff --git a/tests/manual/simple_bootloader/child_image/mcuboot/Kconfig.root b/tests/manual/simple_bootloader/child_image/mcuboot/Kconfig.root deleted file mode 100644 index fbcf18a109..0000000000 --- a/tests/manual/simple_bootloader/child_image/mcuboot/Kconfig.root +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# The purpose of this file is to create a wrapper Kconfig file that will be set as -# mcuboot_KCONFIG_ROOT and processed before any other Kconfig for mcuboot child image. - -source "${ZEPHYR_BASE}/../sidewalk/samples/common/Kconfig.mcuboot.defaults" -source "${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr/Kconfig" diff --git a/tests/manual/simple_bootloader/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/tests/manual/simple_bootloader/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 0000000000..5f09413333 --- /dev/null +++ b/tests/manual/simple_bootloader/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,14 @@ +# +# Copyright (c) 2021 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +# Ensure that the qspi driver is disabled by default +CONFIG_NORDIC_QSPI_NOR=n + +# TODO: below are not yet supported and need fixing +CONFIG_FPROTECT=n +CONFIG_BOOT_WATCHDOG_FEED=n diff --git a/tests/manual/simple_bootloader/child_image/mcuboot/prj.conf b/tests/manual/simple_bootloader/child_image/mcuboot/prj.conf index 78d762258b..015b46e086 100644 --- a/tests/manual/simple_bootloader/child_image/mcuboot/prj.conf +++ b/tests/manual/simple_bootloader/child_image/mcuboot/prj.conf @@ -5,6 +5,10 @@ CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" +CONFIG_BOOT_ENCRYPT_IMAGE=n +CONFIG_CBPRINTF_NANO=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0 + CONFIG_BOOT_UPGRADE_ONLY=n CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/tests/manual/simple_bootloader/pm_static.yml b/tests/manual/simple_bootloader/pm_static.yml new file mode 100644 index 0000000000..38e6c17c13 --- /dev/null +++ b/tests/manual/simple_bootloader/pm_static.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0xff000 + region: flash_primary + size: 0x1000 diff --git a/tests/manual/simple_bootloader/pm_static_nrf52840dk_nrf52840.yml b/tests/manual/simple_bootloader/pm_static_nrf52840dk_nrf52840.yml index 2ce99cea06..91a1ce76f1 100644 --- a/tests/manual/simple_bootloader/pm_static_nrf52840dk_nrf52840.yml +++ b/tests/manual/simple_bootloader/pm_static_nrf52840dk_nrf52840.yml @@ -2,10 +2,6 @@ mcuboot: address: 0x0 region: flash_primary size: 0x7000 -sidewalk_storage: - address: 0xf9000 - region: flash_primary - size: 0x6000 mfg_storage: address: 0xff000 region: flash_primary diff --git a/tests/manual/simple_bootloader/pm_static_nrf5340dk_nrf5340_cpuapp.yml b/tests/manual/simple_bootloader/pm_static_nrf5340dk_nrf5340_cpuapp.yml index 659c47e83e..6a225508e6 100644 --- a/tests/manual/simple_bootloader/pm_static_nrf5340dk_nrf5340_cpuapp.yml +++ b/tests/manual/simple_bootloader/pm_static_nrf5340dk_nrf5340_cpuapp.yml @@ -2,10 +2,6 @@ mcuboot: address: 0x0 region: flash_primary size: 0x8000 -sidewalk_storage: - address: 0xf9000 - region: flash_primary - size: 0x6000 mfg_storage: address: 0xff000 region: flash_primary diff --git a/tests/manual/simple_bootloader/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/tests/manual/simple_bootloader/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 0000000000..d012052b69 --- /dev/null +++ b/tests/manual/simple_bootloader/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0x17c000 + region: flash_primary + size: 0x1000 diff --git a/tests/manual/simple_bootloader/sample.yaml b/tests/manual/simple_bootloader/sample.yaml index 7ee82a9fcb..21886468b4 100644 --- a/tests/manual/simple_bootloader/sample.yaml +++ b/tests/manual/simple_bootloader/sample.yaml @@ -4,8 +4,9 @@ sample: tests: sidewalk.test.simple_bootloader: build_only: true - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk diff --git a/tests/unit_tests/pal_critical_region/CMakeLists.txt b/tests/unit_tests/pal_critical_region/CMakeLists.txt deleted file mode 100644 index fed36c0c02..0000000000 --- a/tests/unit_tests/pal_critical_region/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -cmake_minimum_required(VERSION 3.20.0) - -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(sidewalk_test_critical_region) -set(SIDEWALK_BASE $ENV{ZEPHYR_BASE}/../sidewalk) - -target_include_directories(app PRIVATE ${SIDEWALK_BASE}/subsys/sal/common/sid_pal_ifc) -target_include_directories(app PRIVATE src) -target_sources(app PRIVATE ${SIDEWALK_BASE}/subsys/sal/sid_pal/src/sid_critical_region.c) - -# add test file -target_sources(app PRIVATE src/main.c) diff --git a/tests/unit_tests/pal_critical_region/Kconfig b/tests/unit_tests/pal_critical_region/Kconfig deleted file mode 100644 index ef8faaf329..0000000000 --- a/tests/unit_tests/pal_critical_region/Kconfig +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) 2023 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -config SIDEWALK_CRITICAL_REGION_RE_ENTRY_MAX - default 2 - help - Maximum nesting level of critical region - If the nesting level becomes greater than set by this config, assert will be triggered. - -source "${ZEPHYR_BASE}/../sidewalk/Kconfig" -source "Kconfig.zephyr" diff --git a/tests/unit_tests/pal_critical_region/prj.conf b/tests/unit_tests/pal_critical_region/prj.conf deleted file mode 100644 index 8f7bde23cc..0000000000 --- a/tests/unit_tests/pal_critical_region/prj.conf +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# -CONFIG_TEST=y -CONFIG_ZTEST=y -CONFIG_NO_OPTIMIZATIONS=y -CONFIG_IDLE_STACK_SIZE=1024 diff --git a/tests/unit_tests/pal_critical_region/src/main.c b/tests/unit_tests/pal_critical_region/src/main.c deleted file mode 100644 index 3045f9dc56..0000000000 --- a/tests/unit_tests/pal_critical_region/src/main.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ -#include -#include - -#include - -#include -#include - -#include - -#define TEST_IRQ (24) -#define TEST_IRQ2 (25) -#define TEST_IRQ3 (26) -#define TEST_IRQ4 (27) -#define TEST_IRQ_PRIO (2) - -#define DELAY_BEFORE_IRQ_CHECK_US (50) - -void irq_cb(const void *arg) -{ - *(uint32_t *)arg += 1; -} - -ZTEST(pal_critical_region, test_sid_pal_critical_region) -{ - static uint32_t call_count = 0; - static volatile uint32_t expected_callcount = 0; - IRQ_CONNECT(TEST_IRQ, TEST_IRQ_PRIO, irq_cb, (const void *)&call_count, 0); - irq_enable(TEST_IRQ); - - trigger_irq(TEST_IRQ); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - expected_callcount++; - zassert_equal(expected_callcount, call_count); - - sid_pal_enter_critical_region(); - { - trigger_irq(TEST_IRQ); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - zassert_equal(expected_callcount, call_count); - } - sid_pal_exit_critical_region(); - - expected_callcount++; - zassert_equal(expected_callcount, call_count); - - trigger_irq(TEST_IRQ); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - expected_callcount++; - zassert_equal(expected_callcount, call_count); -} - -ZTEST(pal_critical_region, test_sid_pal_critical_multiple_entry) -{ - static uint32_t call_count = 0; - static volatile uint32_t expected_callcount = 0; - IRQ_CONNECT(TEST_IRQ3, TEST_IRQ_PRIO, irq_cb, (const void *)&call_count, 0); - irq_enable(TEST_IRQ3); - - trigger_irq(TEST_IRQ3); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - expected_callcount++; - zassert_equal(expected_callcount, call_count); - - sid_pal_enter_critical_region(); - { - trigger_irq(TEST_IRQ3); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - zassert_equal(expected_callcount, call_count); - - sid_pal_enter_critical_region(); - { - zassert_equal(expected_callcount, call_count); - } - sid_pal_exit_critical_region(); - zassert_equal(expected_callcount, call_count); - } - sid_pal_exit_critical_region(); - - expected_callcount++; - zassert_equal(expected_callcount, call_count); - trigger_irq(TEST_IRQ3); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - expected_callcount++; - zassert_equal(expected_callcount, call_count); -} - -ZTEST(pal_critical_region, test_sid_pal_critical_region_multiple_entry_multiple_irq) -{ - static uint32_t call_count = 0; - static volatile uint32_t expected_callcount = 0; - IRQ_CONNECT(TEST_IRQ4, TEST_IRQ_PRIO, irq_cb, (const void *)&call_count, 0); - irq_enable(TEST_IRQ4); - - trigger_irq(TEST_IRQ4); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - expected_callcount++; - zassert_equal(expected_callcount, call_count); - - sid_pal_enter_critical_region(); - { - trigger_irq(TEST_IRQ4); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - zassert_equal(expected_callcount, call_count); - sid_pal_enter_critical_region(); - { - trigger_irq(TEST_IRQ4); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - zassert_equal(expected_callcount, call_count); - } - sid_pal_exit_critical_region(); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - zassert_equal(expected_callcount, call_count); - } - sid_pal_exit_critical_region(); - - // only one IRQ is queued - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - expected_callcount++; - zassert_equal(expected_callcount, call_count); - - trigger_irq(TEST_IRQ4); - k_busy_wait(DELAY_BEFORE_IRQ_CHECK_US); - expected_callcount++; - zassert_equal(expected_callcount, call_count); -} - -ZTEST(pal_critical_region, test_sanity) -{ - zassert_true(true); -} - -ZTEST_SUITE(pal_critical_region, NULL, NULL, NULL, NULL, NULL); diff --git a/tests/unit_tests/pal_critical_region/testcase.yaml b/tests/unit_tests/pal_critical_region/testcase.yaml deleted file mode 100644 index 9d4903fb12..0000000000 --- a/tests/unit_tests/pal_critical_region/testcase.yaml +++ /dev/null @@ -1,7 +0,0 @@ -tests: - sidewalk.unit_tests.critical_region: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp native_posix - tags: Sidewalk - integration_platforms: - - native_posix - - nrf52840dk_nrf52840 diff --git a/tests/unit_tests/sid_ace_alloc/testcase.yaml b/tests/unit_tests/sid_ace_alloc/testcase.yaml index 926a3034b5..766db1ba41 100644 --- a/tests/unit_tests/sid_ace_alloc/testcase.yaml +++ b/tests/unit_tests/sid_ace_alloc/testcase.yaml @@ -1,7 +1,12 @@ tests: sidewalk.unit_tests.ace.alloc: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp native_posix + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - native_posix + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk integration_platforms: - native_posix - nrf52840dk_nrf52840 + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/tests/validation/crypto/pm_static.yml b/tests/validation/crypto/pm_static.yml index 03d4950266..38e6c17c13 100644 --- a/tests/validation/crypto/pm_static.yml +++ b/tests/validation/crypto/pm_static.yml @@ -1,8 +1,3 @@ -sidewalk_storage: - address: 0xf8000 - region: flash_primary - size: 0x7000 - mfg_storage: address: 0xff000 region: flash_primary diff --git a/tests/validation/crypto/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/tests/validation/crypto/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 0000000000..d012052b69 --- /dev/null +++ b/tests/validation/crypto/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0x17c000 + region: flash_primary + size: 0x1000 diff --git a/tests/validation/crypto/prj.conf b/tests/validation/crypto/prj.conf index af0327cd96..6ef9efeeee 100644 --- a/tests/validation/crypto/prj.conf +++ b/tests/validation/crypto/prj.conf @@ -10,19 +10,13 @@ CONFIG_SIDEWALK_SUBGHZ_SUPPORT=n CONFIG_SIDEWALK_LOG_LEVEL_OFF=y CONFIG_SIDEWALK_CRYPTO_LOG_LEVEL_OFF=y -# Stacks CONFIG_TEST_EXTRA_STACK_SIZE=4096 CONFIG_ZTEST_STACK_SIZE=4096 CONFIG_MAIN_STACK_SIZE=4096 -CONFIG_HEAP_MEM_POOL_SIZE=4096 -CONFIG_MBEDTLS_ENABLE_HEAP=y CONFIG_MBEDTLS_HEAP_SIZE=4096 -CONFIG_PSA_WANT_ALG_SHA_512=y - # Debug CONFIG_RESET_ON_FATAL_ERROR=n # FPU CONFIG_FPU=y -CONFIG_PARTITION_MANAGER_ENABLED=y diff --git a/tests/validation/crypto/testcase.yaml b/tests/validation/crypto/testcase.yaml index d1b2880d48..27ba37ce84 100644 --- a/tests/validation/crypto/testcase.yaml +++ b/tests/validation/crypto/testcase.yaml @@ -1,7 +1,11 @@ tests: sidewalk.sid_validation.pal_crypto: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: + - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/tests/validation/storage_kv/pm_static.yml b/tests/validation/storage_kv/pm_static.yml index 03d4950266..38e6c17c13 100644 --- a/tests/validation/storage_kv/pm_static.yml +++ b/tests/validation/storage_kv/pm_static.yml @@ -1,8 +1,3 @@ -sidewalk_storage: - address: 0xf8000 - region: flash_primary - size: 0x7000 - mfg_storage: address: 0xff000 region: flash_primary diff --git a/tests/validation/storage_kv/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/tests/validation/storage_kv/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 0000000000..d012052b69 --- /dev/null +++ b/tests/validation/storage_kv/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0x17c000 + region: flash_primary + size: 0x1000 diff --git a/tests/validation/storage_kv/testcase.yaml b/tests/validation/storage_kv/testcase.yaml index 510468dc34..8fdc509492 100644 --- a/tests/validation/storage_kv/testcase.yaml +++ b/tests/validation/storage_kv/testcase.yaml @@ -1,7 +1,8 @@ tests: sidewalk.sid_validation.pal_storage_kv: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk integration_platforms: - nrf52840dk_nrf52840 - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/tests/validation/timer/pm_static.yml b/tests/validation/timer/pm_static.yml index 03d4950266..38e6c17c13 100644 --- a/tests/validation/timer/pm_static.yml +++ b/tests/validation/timer/pm_static.yml @@ -1,8 +1,3 @@ -sidewalk_storage: - address: 0xf8000 - region: flash_primary - size: 0x7000 - mfg_storage: address: 0xff000 region: flash_primary diff --git a/tests/validation/timer/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/tests/validation/timer/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 0000000000..d012052b69 --- /dev/null +++ b/tests/validation/timer/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,4 @@ +mfg_storage: + address: 0x17c000 + region: flash_primary + size: 0x1000 diff --git a/tests/validation/timer/testcase.yaml b/tests/validation/timer/testcase.yaml index e1f41c2d64..d56d69d6f1 100644 --- a/tests/validation/timer/testcase.yaml +++ b/tests/validation/timer/testcase.yaml @@ -1,6 +1,8 @@ tests: sidewalk.sid_validation.pal_timer: - platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf54l15pdk_nrf54l15_cpuapp tags: Sidewalk integration_platforms: - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf54l15pdk_nrf54l15_cpuapp diff --git a/utils/include/application_states.h b/utils/include/application_states.h index 718bd33e38..7f1c3d2f78 100644 --- a/utils/include/application_states.h +++ b/utils/include/application_states.h @@ -29,6 +29,16 @@ X(dfu, gpio1, 2) \ X(sending, gpio1, 4) \ X(receiving, gpio1, 3) +#elif defined(NRF54L15_ENGA_XXAA) +#define X_APPLICAITON_STATES \ + X(error, gpio1, 4) \ + X(working, gpio1, 14) \ + X(registered, gpio1, 13) \ + X(time_sync, gpio1, 8) \ + X(connected, gpio0, 4) \ + X(dfu, gpio1, 5) \ + X(sending, gpio1, 6) \ + X(receiving, gpio1, 7) #else #error "Unknow device application states." #endif diff --git a/utils/src/state_notifier_gpio_backend.c b/utils/src/state_notifier_gpio_backend.c index 55ac7f7947..57450be81c 100644 --- a/utils/src/state_notifier_gpio_backend.c +++ b/utils/src/state_notifier_gpio_backend.c @@ -35,8 +35,12 @@ static void gpio_enumerate_state(enum application_state state_id, uint32_t value { struct gpio_pin gpio_id = state_to_pin_mapper(state_id); +#if defined(NRF54L15_ENGA_XXAA) + gpio_pin_set_raw(gpio_id.port, gpio_id.pin, value); +#else /* output activated with low state */ gpio_pin_set_raw(gpio_id.port, gpio_id.pin, !value); +#endif } static void state_change_handler_gpio(const struct notifier_state *state)