#include <mpsl_lib.h>
Uninitialize MPSL and disable interrupt handlers.
This routine uninitializes MPSL (via mpsl_uninit) and disables MPSL interrupts. Uninitializing MPSL stops clocks and scheduler. This will release all peripherals and reduce power usage, allowing the user to override any interrupt handlers used by MPSL.
- Precondition
- This method requires CONFIG_MPSL_DYNAMIC_INTERRUPTS to be enabled.
-
The function requires the multithreading lock (
- See also
- MULTITHREADING_LOCK_ACQUIRE()) to be acquired before.
- Note
- After successful execution of this method, user-supplied interrupt handlers can be attached to RADIO_IRQn, RTC0_IRQn, and TIMER0_IRQn using irq_connect_dynamic. Care must be taken when developing these handlers, as they will be executed as direct dynamic interrupts. See ARM_IRQ_DIRECT_DYNAMIC_CONNECT for additional documentation. These interrupts will trigger thread re-scheduling upon return.
- Return values
-
| 0 | MPSL disabled successfully. |
| -NRF_EPERM | Operation is not supported. |