CONFIG_BT=y), I encounter the following issues when trying to initialize ESB mode.mpsl_lib_uninit()clocks_start() and then esb_initialize() directly, the system triggers an MPSL ASSERT and leads to a Hard Fault.err = clocks_start();
if (err) {
LOG_ERR("clocks_start failed: %d", err);
return 0;
}
LOG_INF("esb_initialize");
esb_initialize(RFMOUSE_M);E: MPSL ASSERT: 2, 62 E: ***** HARD FAULT ***** E: Fault escalation (see below) E: ARCH_EXCEPT with reason 3 E: r0/a1: 0x00000003 r1/a2: 0x0003393b r2/a3: 0x20007f18 E: r3/a4: 0x00000003 r12/ip: 0x20004028 r14/lr: 0x0001ed73 E: xpsr: 0x2100009a E: Faulting instruction address (r15/pc): 0x0001ed82 E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0 E: Fault during interrupt handling E: Current thread: 0x20004028 (idle) E: Resetting system
mpsl_lib_uninit() before ESB initializationmpsl_lib_uninit() to release resources first, the system hangs indefinitely inside the do-while loop of my clocks_start() function.err = mpsl_lib_uninit();
if (err) {
LOG_ERR("mpsl_lib_uninit failed: %d", err);
return;
} else {
LOG_INF("mpsl_lib_uninit Start");
}
err = clocks_start(); // Hangs here
if (err) {
LOG_ERR("clocks_start failed: %d", err);
return 0;
}
esb_initialize(RFMOUSE_M);clocks_start):int clocks_start(void)
{
int err;
int res;
struct onoff_manager *clk_mgr;
struct onoff_client clk_cli;
clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF);
if (!clk_mgr) {
LOG_ERR("Unable to get the Clock manager");
return -ENXIO;
}
sys_notify_init_spinwait(&clk_cli.notify);
err = onoff_request(clk_mgr, &clk_cli);
if (err < 0) {
LOG_ERR("Clock request failed: %d", err);
return err;
}
do {
// [Hang Point]: After mpsl_lib_uninit(), err never becomes 0.
// It seems the notification for clock readiness is never triggered.
err = sys_notify_fetch_result(&clk_cli.notify, &res);
if (!err && res) {
LOG_ERR("Clock could not be started: %d", res);
return res;
}
} while (err);
return 0;- Chip: nRF54L15
- SDK Version: nRF Connect SDK v3.1.1
- Kconfig:
CONFIG_BT=y,CONFIG_MPSL=y,CONFIG_ESB=y,CONFIG_DYNAMIC_INTERRUPTS=y
On nRF54L15 (NCS v3.1.1), what is the recommended standard procedure to completely release Radio and Clock resources from MPSL so that
nrf_esb can be initialized and take full control?