Skip to content

Commit d31e3c0

Browse files
martintvhermabe
authored andcommitted
mpsl: Add KConfig around forcing RRAM when running from NONSECURE
Since this isn't makes powerconsumption be very high, we can let it only be done when "advanced" bluetotoh features are used. Signed-off-by: Martin Tverdal <[email protected]>
1 parent 9ed7bdd commit d31e3c0

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

subsys/mpsl/init/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ config MPSL_INIT_PRIORITY
119119
must be lower than CONFIG_NRFS_BACKEND_IPC_SERVICE_INIT_PRIO. The nrf2 clock control depends
120120
on the nRFS backend.
121121

122+
config MPSL_FORCE_RRAM_ON_ALL_THE_TIME
123+
bool "Force RRAM to stay on"
124+
depends on TRUSTED_EXECUTION_NONSECURE
125+
default y
126+
help
127+
This option forces RRAM to stay on.
128+
This is not needed when only basic bluetooth features are used.
129+
Only needed when for example LLPM, Frame space update, ISO or Channel Sounding is used.
130+
122131
module=MPSL
123132
module-str=MPSL
124133
source "$(ZEPHYR_BASE)/subsys/logging/Kconfig.template.log_config"

subsys/mpsl/init/mpsl_init.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,8 @@ static int32_t mpsl_lib_init_internal(void)
445445
return err;
446446
}
447447
#endif /* MPSL_TIMESLOT_SESSION_COUNT > 0 */
448-
#if defined(NRF_TRUSTZONE_NONSECURE)
449-
/* Temporary fix in order to get mpsl to work well when
450-
* compiling for nrf54l15dk/nrf54l15/cpuapp/ns
451-
*/
448+
#if defined(NRF_TRUSTZONE_NONSECURE) && \
449+
defined(CONFIG_MPSL_FORCE_RRAM_ON_ALL_THE_TIME)
452450
uint32_t result_out;
453451
uint32_t result = tfm_platform_mem_write32((uint32_t)&NRF_RRAMC_S->POWER.LOWPOWERCONFIG,
454452
RRAMC_POWER_LOWPOWERCONFIG_MODE_Standby << RRAMC_POWER_LOWPOWERCONFIG_MODE_Pos,

0 commit comments

Comments
 (0)