Skip to content

mpsl: unify CONSTLAT/low-power hooks; add NVM low-latency handling#27670

Merged
ppryga-nordic merged 1 commit into
nrfconnect:mainfrom
ppryga-nordic:mpsl_provide_implementation_for_nvm_low_latency_requeq_release
Mar 30, 2026
Merged

mpsl: unify CONSTLAT/low-power hooks; add NVM low-latency handling#27670
ppryga-nordic merged 1 commit into
nrfconnect:mainfrom
ppryga-nordic:mpsl_provide_implementation_for_nvm_low_latency_requeq_release

Conversation

@ppryga-nordic
Copy link
Copy Markdown
Contributor

@ppryga-nordic ppryga-nordic commented Mar 24, 2026

Replace mpsl_constlat_request_callback and mpsl_lowpower_request- _callback with a single low-latency acquire/release API.

The MPSL library expects implementations of the new public functions
handle acquire/release of low-latency mode on the NVM controller.

The integration layer supplies this for all MPSL users in the SDK.
The implementation allows to control the NVM latency by nrf_sys_event
subsystem. For that an application has the select the NRF_SYS_EVENT
KConfig.

As of now the new API and NVM latency control is required for
nRF54Lxx SoCs.

@ppryga-nordic ppryga-nordic requested a review from a team as a code owner March 24, 2026 14:18
@NordicBuilder
Copy link
Copy Markdown
Contributor

NordicBuilder commented Mar 24, 2026

CI Information

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

Inputs:

Sources:

sdk-nrf: PR head: 743721128907f4fd7a33c1f94b9511ed94066faf

more details

sdk-nrf:

PR head: 743721128907f4fd7a33c1f94b9511ed94066faf
merge base: 6e129075406ae55fd9b825e949853ae1e60aaba8
target head (main): 6e129075406ae55fd9b825e949853ae1e60aaba8
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 (1)
subsys
│  ├── mpsl
│  │  ├── init
│  │  │  │ mpsl_init.c

Outputs:

Toolchain

Version: 911f4c5c26
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:911f4c5c26_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: 26
  • ✅ Integration tests
    • ✅ 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-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-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-fw-nrfconnect-ble_samples
Disabled integration tests
    • test-fw-nrfconnect-nrf_lrcs_mosh
    • test-fw-nrfconnect-nrf_lrcs_positioning
    • desktop52_verification
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-nfc
    • 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-nrf_crypto
    • test-fw-nrfconnect-ps-main
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-tfm
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-mcuboot
    • test-secdom-samples-public

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

@ppryga-nordic ppryga-nordic force-pushed the mpsl_provide_implementation_for_nvm_low_latency_requeq_release branch 5 times, most recently from f0da8f5 to eb47e42 Compare March 26, 2026 06:53
@ppryga-nordic
Copy link
Copy Markdown
Contributor Author

Temporarily removed build assert:

BUILD_ASSERT(IS_ENABLED(CONFIG_NRF_SYS_EVENT_IRQ_LATENCY), "MPSL requires NRF_SYS_EVENT_IRQ_LATENCY to handle NVM low latency mode");

It will be added in separate PR when the MPLS libraries are updated.

@ppryga-nordic ppryga-nordic force-pushed the mpsl_provide_implementation_for_nvm_low_latency_requeq_release branch 3 times, most recently from a466da0 to ba57728 Compare March 26, 2026 13:40
@ppryga-nordic
Copy link
Copy Markdown
Contributor Author

Temporarily removed build assert:

BUILD_ASSERT(IS_ENABLED(CONFIG_NRF_SYS_EVENT_IRQ_LATENCY), "MPSL requires NRF_SYS_EVENT_IRQ_LATENCY to handle NVM low latency mode");

It will be added in separate PR when the MPLS libraries are updated.
The assert will not be introduced back. The integration layer was modified so the CONFIG_NRF_SYS_EVENT is no longer mandatory. It can be enabled by an application if needed.

@ppryga-nordic ppryga-nordic force-pushed the mpsl_provide_implementation_for_nvm_low_latency_requeq_release branch from ba57728 to 2ed6523 Compare March 27, 2026 07:46
@ppryga-nordic ppryga-nordic added this to the 3.3.0 milestone Mar 27, 2026
@ppryga-nordic ppryga-nordic force-pushed the mpsl_provide_implementation_for_nvm_low_latency_requeq_release branch from 2ed6523 to 4a97e3b Compare March 27, 2026 11:42
@ppryga-nordic ppryga-nordic changed the title mpsl: provide implementation for NVM low-latency request and release mpsl: unify CONSTLAT/low-power hooks; add NVM low-latency handling Mar 27, 2026
@ppryga-nordic ppryga-nordic force-pushed the mpsl_provide_implementation_for_nvm_low_latency_requeq_release branch from 4a97e3b to b5bd20c Compare March 27, 2026 12:11
LOG_ERR("NVM low latency request has failed (%d)", err);
}
#else
nrf_power_task_trigger(NRF_POWER, NRF_POWER_TASK_CONSTLAT);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here we should handle the case where CONFIG_NRF_SYS_EVENT is not enabled, but where NRFX_POWER is enabled. That is, call nrfx_power_constlat_mode_request()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@ppryga-nordic ppryga-nordic force-pushed the mpsl_provide_implementation_for_nvm_low_latency_requeq_release branch from b5bd20c to fa79255 Compare March 27, 2026 12:52
@ppryga-nordic ppryga-nordic force-pushed the mpsl_provide_implementation_for_nvm_low_latency_requeq_release branch 2 times, most recently from ffb963f to d8d72d7 Compare March 27, 2026 13:51
@ppryga-nordic ppryga-nordic force-pushed the mpsl_provide_implementation_for_nvm_low_latency_requeq_release branch from d8d72d7 to 820cb13 Compare March 27, 2026 20:00
The `mpsl_constlat_request_callback` and `mpsl_lowpower_request-
_callback` will be replaced with a single low-latency acquire/release
API. The new API is added in this commit. The former one will be
removed in followin commit when the modified MPSL library is
available in nrfxlib.

The MPSL library expects implementations of the new public functions
handle acquire/release of low-latency mode on the NVM controller.

The integration layer supplies this for all MPSL users in the SDK.
The implementation allows to control the NVM latency by nrf_sys_event
subsystem. For that an application has the select the NRF_SYS_EVENT
KConfig.

As of now the new API and NVM latency control is required for
nRF54Lxx SoCs.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
@ppryga-nordic ppryga-nordic force-pushed the mpsl_provide_implementation_for_nvm_low_latency_requeq_release branch from 820cb13 to 7437211 Compare March 28, 2026 08:34
@ppryga-nordic ppryga-nordic merged commit 9a6ef7e into nrfconnect:main Mar 30, 2026
19 checks passed
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.

4 participants