Skip to content

Conversation

@Vge0rge
Copy link
Contributor

@Vge0rge Vge0rge commented Nov 25, 2025

Add the tfm_platform_hal_system_off function which puts the
device in system off.

This only needed for nRF54L devices at the moment and only
in TF-M SFN mode.

Copilot AI review requested due to automatic review settings November 25, 2025 15:29
@Vge0rge Vge0rge requested review from a team as code owners November 25, 2025 15:29
@NordicBuilder NordicBuilder added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Nov 25, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds TF-M HAL support for system off functionality on nRF54L devices in TF-M SFN mode. The implementation provides a new platform service that allows non-secure applications to request system off mode through a secure service call.

  • Adds tfm_platform_hal_system_off function to disable RAM retention and enter system off mode
  • Introduces CONFIG_TFM_NRF_SYSTEM_OFF_SERVICE Kconfig option with appropriate dependencies
  • Updates west.yml dependencies to pull in required changes from Zephyr and TF-M repositories

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
west.yml Updates Zephyr and TF-M revisions to pull PRs with system off support
modules/trusted-firmware-m/tfm_boards/src/tfm_platform_system.c Implements the system off HAL function with RAM retention disable
modules/trusted-firmware-m/Kconfig Adds configuration option for the system off service with appropriate dependencies
modules/trusted-firmware-m/CMakeLists.txt Passes the system off service configuration to TF-M build
samples/zephyr/boards/nordic/system_off/boards/*.conf Enables TFM_SFN and system off service for nRF54L board variants

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

depends on !RETAINED_MEM_NRF_RAM_CTRL
select EXPERIMENTAL
help
Provide a system off service for the NRF nRF54L series SoCs.
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Corrected spelling of 'NRF' to 'Nordic nRF' for consistency with standard naming conventions.

Suggested change
Provide a system off service for the NRF nRF54L series SoCs.
Provide a system off service for the Nordic nRF54L series SoCs.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NRF and/or Nordic seems superfluous in an sdk-nrf Kconfig

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove yeah

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Nov 25, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
trusted-firmware-m nrfconnect/sdk-trusted-firmware-m@565a30c (main) nrfconnect/sdk-trusted-firmware-m#212 nrfconnect/sdk-trusted-firmware-m#212/files
zephyr nrfconnect/sdk-zephyr@dc05376 (main) nrfconnect/sdk-zephyr#3330 nrfconnect/sdk-zephyr#3330/files

DNM label due to: 2 projects with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Nov 25, 2025

CI Information

To view the history of this post, click the 'edited' button above
Build number: 14

Inputs:

Sources:

trusted-firmware-m: PR head: 3df8d8bf82ad15e6cdcadb19f534a25103ada811
sdk-nrf: PR head: 595322cad7e090a94541729c617804f10adc1606
zephyr: PR head: 0cf9c594cab7f1ef71c927ea6e84eab742a31530

more details

trusted-firmware-m:

PR head: 3df8d8bf82ad15e6cdcadb19f534a25103ada811
merge base: 565a30c7f4426cdf644bff03766a292dd509ee9c
target head (main): 565a30c7f4426cdf644bff03766a292dd509ee9c
Diff

sdk-nrf:

PR head: 595322cad7e090a94541729c617804f10adc1606
merge base: dc286e807a0b116816aa6d6b015d8b2a8b8a4faf
target head (main): 0c79406a493836eff01af3bf4a75b49a5a47ca16
Diff

zephyr:

PR head: 0cf9c594cab7f1ef71c927ea6e84eab742a31530
merge base: dc05376c170fc2739a4881629caf49c40d485a9e
target head (main): dc05376c170fc2739a4881629caf49c40d485a9e
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (14)
modules
│  ├── tee
│  │  ├── tf-m
│  │  │  ├── trusted-firmware-m
│  │  │  │  ├── interface
│  │  │  │  │  ├── include
│  │  │  │  │  │  │ tfm_platform_api.h
│  │  │  │  │  ├── src
│  │  │  │  │  │  │ tfm_platform_api.c
│  │  │  │  ├── platform
│  │  │  │  │  ├── ext
│  │  │  │  │  │  ├── target
│  │  │  │  │  │  │  ├── nordic_nrf
│  │  │  │  │  │  │  │  ├── common
│  │  │  │  │  │  │  │  │  ├── core
│  │  │  │  │  │  │  │  │  │  │ CMakeLists.txt
│  │  │  │  │  ├── include
│  │  │  │  │  │  │ tfm_platform_system.h
│  │  │  │  ├── secure_fw
│  │  │  │  │  ├── partitions
│  │  │  │  │  │  ├── platform
│  │  │  │  │  │  │  │ platform_sp.c
│  ├── trusted-firmware-m
│  │  ├── CMakeLists.txt
│  │  ├── Kconfig
│  │  ├── tfm_boards
│  │  │  ├── src
│  │  │  │  │ tfm_platform_system.c
samples
│  ├── zephyr
│  │  ├── boards
│  │  │  ├── nordic
│  │  │  │  ├── system_off
│  │  │  │  │  ├── boards
│  │  │  │  │  │  ├── nrf54l15dk_nrf54l10_cpuapp_ns.conf
│  │  │  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.conf
│  │  │  │  │  │  ├── nrf54lm20dk_nrf54lm20a_cpuapp_ns.conf
│  │  │  │  │  │  │ nrf54lv10dk_nrf54lv10a_cpuapp_ns.conf
west.yml
zephyr
│  ├── soc
│  │  ├── nordic
│  │  │  ├── common
│  │  │  │  │ poweroff.c

Outputs:

Toolchain

Version: 964ddb2c70
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:964ddb2c70_5ea73affbf

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister - Skipped: Skipping Build & Test as it succeeded in a previous run: 13
  • ✅ Integration tests
    • ✅ test-sdk-audio - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test_ble_nrf_config - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-chip - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nfc - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf_crypto - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rs - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-fem - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-tfm - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-thread-main - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-find-my - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-low-level
    • ✅ test-sdk-mcuboot - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-dfu - Skipped: Job was skipped as it succeeded in a previous run
    • ⚠️ test-fw-nrfconnect-nrf-iot_cloud
Disabled integration tests
    • test-fw-nrfconnect-nrf_lrcs_positioning
    • desktop52_verification
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-ps-main
    • test-fw-nrfconnect-rpc
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@Vge0rge Vge0rge force-pushed the tfm_system_off branch 2 times, most recently from 2603256 to b8abb4f Compare November 26, 2025 11:17
Copilot AI review requested due to automatic review settings November 26, 2025 11:17
@Vge0rge Vge0rge added this to the 3.2.0 milestone Nov 26, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Vge0rge
Copy link
Contributor Author

Vge0rge commented Nov 26, 2025

Ping @nrfconnect/ncs-co-build-system @nrfconnect/ncs-low-level-test @nrfconnect/ncs-code-owners

@Vge0rge Vge0rge removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 26, 2025
prompt "[EXPERIMENTAL] TF-M NRF System Off Service"
depends on TFM_ISOLATION_LEVEL = 1
depends on TFM_SFN
depends on SOC_SERIES_NRF54LX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about nRF71?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not urgent. Post NCS 3.2, unless adding this doesn't delay the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot test it so I will not add it myself now. It can be added later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot AI review requested due to automatic review settings November 26, 2025 13:27
@NordicBuilder NordicBuilder added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 26, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nordic-piks
Copy link
Contributor

@Vge0rge
Copy link
Contributor Author

Vge0rge commented Nov 26, 2025

Please add also configuration for other places where system_off is tested: https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bluetooth/peripheral_power_profiling https://github.com/nrfconnect/sdk-nrf/tree/main/tests/benchmarks/current_consumption/system_off

These needs more work (I tried with my board and they don't work for NS) and this PR is already tight for the release. So I prefer to try to get that in as is and add support for these samples later.

Copilot AI review requested due to automatic review settings November 26, 2025 15:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

You can find the documentation preview for this PR here.

Copy link
Contributor

@tomi-font tomi-font left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release notes entry?

prompt "[EXPERIMENTAL] TF-M NRF System Off Service"
depends on TFM_ISOLATION_LEVEL = 1
depends on TFM_SFN
depends on SOC_SERIES_NRF54LX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vge0rge
Copy link
Contributor Author

Vge0rge commented Nov 27, 2025

Release notes entry?

Will be done later, since docs can be merged after the code freeze and this is already tight I don't want to include it here.

Copilot AI review requested due to automatic review settings November 27, 2025 08:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tomi-font tomi-font changed the title modules: TF-M: Add TF-M HAL function to enable system off modules: TF-M: Add TF-M HAL function to enable system off Nov 27, 2025
@Vge0rge Vge0rge changed the title modules: TF-M: Add TF-M HAL function to enable system off modules: TF-M: Add TF-M HAL function to enable system off Nov 27, 2025
@Vge0rge Vge0rge changed the title modules: TF-M: Add TF-M HAL function to enable system off modules: TF-M: Add TF-M HAL function to enable system off Nov 27, 2025
Add the tfm_platform_hal_system_off function which puts the
device in system off.

This only needed for nRF54L devices at the moment and only
in TF-M SFN mode.

Signed-off-by: Georgios Vasilakis <[email protected]>
With updates which allows using system off from TF-M.

Signed-off-by: Georgios Vasilakis <[email protected]>
Add an overlay for the nRF54L devices which support TF-M
with system off. This is needed because the feature is not
enabled by default and it also have requirements which
deviate from the default TF-M configuration.

Signed-off-by: Georgios Vasilakis <[email protected]>
Copilot AI review requested due to automatic review settings November 27, 2025 11:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Vge0rge Vge0rge removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants