Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions subsys/mpsl/init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ config MPSL_INIT_PRIORITY
must be lower than CONFIG_NRFS_BACKEND_IPC_SERVICE_INIT_PRIO. The nrf2 clock control depends
on the nRFS backend.

config MPSL_FORCE_RRAM_ON_ALL_THE_TIME
bool "Force RRAM to stay on"
depends on TRUSTED_EXECUTION_NONSECURE
default y
help
This option forces RRAM to stay on.
This is not needed when only basic bluetooth features are used.
Only needed when for example LLPM, Frame space update, ISO or Channel Sounding is used.
Comment on lines +125 to +129
Copy link
Contributor

Choose a reason for hiding this comment

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

why not default y when those feature Kconfigs are enabled? instead of just always on?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right now TRUSTED_EXECUTION_NONSECURE is only experimentally supported.
what I want to achive with this KConfig is that I can tell customers who complain that powerconsumption is too high, that they can set this config to =n as long as they know they are not using any of those features. I didnt find nice kconfigs for all those features to use for those features, because some of them get set automaticaly as long as the HW supports them. So then I would have to tell customers how to disable those configs.

Right now I think just doing it this way is the easiest. but when we move TFM support out of experimental, I think we should improve this yes, either by having it as kconfig like this which defaults depending on the features. But we might also do it even fancier, at runtime and only force RRAM on, on links when any of these features are enabled.

Bottom line, I want to merge this now so I can tell customer in NCS 3.2 that uses NS, that they can enable this if they want low power when using bluetooth as long as they dont use any of these features.


module=MPSL
module-str=MPSL
source "$(ZEPHYR_BASE)/subsys/logging/Kconfig.template.log_config"
6 changes: 2 additions & 4 deletions subsys/mpsl/init/mpsl_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,8 @@ static int32_t mpsl_lib_init_internal(void)
return err;
}
#endif /* MPSL_TIMESLOT_SESSION_COUNT > 0 */
#if defined(NRF_TRUSTZONE_NONSECURE)
/* Temporary fix in order to get mpsl to work well when
* compiling for nrf54l15dk/nrf54l15/cpuapp/ns
*/
#if defined(NRF_TRUSTZONE_NONSECURE) && \
defined(CONFIG_MPSL_FORCE_RRAM_ON_ALL_THE_TIME)
uint32_t result_out;
uint32_t result = tfm_platform_mem_write32((uint32_t)&NRF_RRAMC_S->POWER.LOWPOWERCONFIG,
RRAMC_POWER_LOWPOWERCONFIG_MODE_Standby << RRAMC_POWER_LOWPOWERCONFIG_MODE_Pos,
Expand Down