nrfxlib API 2.8.99
Loading...
Searching...
No Matches
mpsl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
16#ifndef MPSL_H__
17#define MPSL_H__
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <stdint.h>
24#include <stdbool.h>
25#include "nrf.h"
26#include "nrf_peripherals.h"
27#include "nrf_errno.h"
28#include "mpsl_clock.h"
29
35#define MPSL_HIGH_IRQ_PRIORITY 0
36
38#define MPSL_BUILD_REVISION_SIZE 20
39
40/* Reserved (D)PPI, PPIB and IPCT resources for the supported platforms. */
41#if defined(NRF52_SERIES)
42#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 19) | (1UL << 30) | (1UL << 31))
43/* This corresponds to the PPI channels 19, 30, and 31. */
44#define MPSL_PPI_CHANNELS_USED_MASK (0xc0080000)
45#elif defined(NRF53_SERIES)
46#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 0) | (1UL << 1) | (1UL << 2))
47/* This corresponds to the DPPI channels 0, 1, and 2. */
48#define MPSL_DPPIC_CHANNELS_USED_MASK (0x00000007)
49#elif defined(NRF54L_SERIES)
50#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
51#define MPSL_DPPIC10_CHANNELS_USED_MASK (0x00000001)
52#define MPSL_DPPIC20_CHANNELS_USED_MASK (0x00000001)
53#define MPSL_PPIB11_CHANNELS_USED_MASK (0x00000001)
54#define MPSL_PPIB21_CHANNELS_USED_MASK (0x00000001)
55#elif defined(NRF54H) || defined(GRTC_PRESENT)
56#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
57#define MPSL_DPPIC020_CHANNELS_USED_MASK (0x00000001)
58#define MPSL_IPCT130_CHANNELS_USED_MASK (0x00000001)
59#else
60#error Unknown NRF series.
61#endif
62
70typedef void (*mpsl_assert_handler_t)(const char * const file, const uint32_t line);
71
93int32_t mpsl_init(mpsl_clock_lfclk_cfg_t const * p_clock_config, IRQn_Type low_prio_irq, mpsl_assert_handler_t p_assert_handler);
94
102void mpsl_uninit(void);
103
109
120int32_t mpsl_build_revision_get(uint8_t * p_build_revision);
121
128
135
142
149
159
165
170void mpsl_pan_rfu(void);
171
179
187#ifdef __cplusplus
188}
189#endif
190
191#endif // MPSL_H__
192
void mpsl_low_priority_process(void)
MPSL low priority processing handler.
void(* mpsl_assert_handler_t)(const char *const file, const uint32_t line)
Function prototype for the assert handler.
Definition mpsl.h:70
void mpsl_pan_rfu(void)
RFU.
int32_t mpsl_build_revision_get(uint8_t *p_build_revision)
Obtain build revision.
void mpsl_uninit(void)
Uninitialize MPSL. Stops clocks and scheduler. This will release all peripherals and reduce power usa...
void mpsl_constlat_request_callback(void)
MPSL requesting CONSTLAT to be on.
void MPSL_IRQ_RADIO_Handler(void)
RADIO interrupt handler.
void mpsl_calibration_timer_handle(void)
Application needs to call this when calibration shall occur.
int32_t mpsl_init(mpsl_clock_lfclk_cfg_t const *p_clock_config, IRQn_Type low_prio_irq, mpsl_assert_handler_t p_assert_handler)
MPSL initialization.
void MPSL_IRQ_CLOCK_Handler(void)
POWER_CLOCK interrupt handler.
void mpsl_lowpower_request_callback(void)
De-request CONSTLAT to be on.
bool mpsl_is_initialized(void)
Returns true if MPSL is already initialized, false otherwise.
void MPSL_IRQ_RTC0_Handler(void)
RTC0 interrupt handler.
void MPSL_IRQ_TIMER0_Handler(void)
TIMER0 interrupt handler.
Type representing LFCLK oscillator source.
Definition mpsl_clock.h:58