nrfxlib API 3.3.99
Loading...
Searching...
No Matches
mpsl_hwres.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
17#ifndef MPSL_HWRES_H__
18#define MPSL_HWRES_H__
19
20/* The xx_SERIES macros are defined here to keep this file independent
21 of the MDK. This allows the header file to be used in nrfx without
22 creating circular dependencies. */
23#if defined(NRF52805_XXAA) || defined(NRF52810_XXAA) || \
24 defined(NRF52811_XXAA) || defined(NRF52820_XXAA) || \
25 defined(NRF52832_XXAA) || defined(NRF52832_XXAB) || \
26 defined(NRF52833_XXAA) || defined(NRF52840_XXAA)
27 #ifndef NRF52_SERIES
28 #define NRF52_SERIES
29 #endif
30#endif
31
32#if defined(NRF5340_XXAA) || defined(NRF5340_XXAA_APPLICATION) || defined(NRF5340_XXAA_NETWORK)
33 #ifndef NRF53_SERIES
34 #define NRF53_SERIES
35 #endif
36#endif
37
38#if defined(NRF54L05_XXAA) || \
39 defined(NRF54LV10A_ENGA_XXAA) || \
40 defined(NRF54LV10A_XXAA) || \
41 defined(NRF54LC10A_XXAA) || \
42 defined(NRF54L10_XXAA) || \
43 defined(NRF54L15_XXAA) || \
44 defined(NRF54LM20A_ENGA_XXAA) || \
45 defined(NRF54LM20A_XXAA) || \
46 defined(NRF54LM20B_XXAA) || \
47 defined(NRF54LS05B_ENGA_XXAA) || \
48 defined(NRF54LS05A_XXAA) || \
49 defined(NRF54LS05B_XXAA) || \
50 defined(NRF7120_ENGA_XXAA)
51 #ifndef LUMOS_XXAA
52 #define LUMOS_XXAA
53 #endif
54#endif
55
56#if defined(NRF54H20_XXAA)
57 #ifndef NRF54H_SERIES
58 #define NRF54H_SERIES
59 #endif
60#endif
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66/* Reserved (D)PPI, PPIB and IPCT resources for the supported platforms. */
67#if defined(NRF52_SERIES)
68 #define MPSL_RESERVED_PPI_CHANNELS ((1UL << 19) | (1UL << 30) | (1UL << 31))
69 /* This corresponds to the PPI channels 19, 30, and 31. */
70 #define MPSL_PPI_CHANNELS_USED_MASK (0xc0080000)
71#elif defined(NRF53_SERIES)
72 #define MPSL_RESERVED_PPI_CHANNELS ((1UL << 0) | (1UL << 1) | (1UL << 2))
73 /* This corresponds to the DPPI channels 0, 1, and 2. */
74 #define MPSL_DPPIC_CHANNELS_USED_MASK (0x00000007)
75#elif defined(LUMOS_XXAA)
76 #define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
77 #define MPSL_DPPIC10_CHANNELS_USED_MASK (0x00000001)
78 #define MPSL_DPPIC20_CHANNELS_USED_MASK (0x00000001)
79 #define MPSL_PPIB11_CHANNELS_USED_MASK (0x00000001)
80 #define MPSL_PPIB21_CHANNELS_USED_MASK (0x00000001)
81#elif defined(NRF54H_SERIES)
82 #define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
83 #define MPSL_DPPIC020_CHANNELS_USED_MASK (0x00000001)
84 #define MPSL_IPCT130_CHANNELS_USED_MASK (0x00000001)
85#else
86 #error Unknown NRF series.
87#endif
88
89/* Defines which timer is being used by the MPSL implementation */
90#if defined(NRF52_SERIES)
91 #define MPSL_TIMER0 NRF_TIMER0
92#elif defined(NRF53_SERIES)
93 #define MPSL_TIMER0 NRF_TIMER0_NS
94#elif defined(LUMOS_XXAA)
95 #define MPSL_TIMER0 NRF_TIMER10
96#else
97 #define MPSL_TIMER0 NRF_TIMER020
98#endif
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif // MPSL_HWRES_H__
105