nrfxlib API 0.1.0
Loading...
Searching...
No Matches
nrf_802154_peripherals_nrf52.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019, Nordic Semiconductor ASA
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright notice, this
11 * list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
18 * contributors may be used to endorse or promote products derived from this
19 * software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 */
34
40#ifndef NRF_802154_PERIPHERALS_NRF52_H__
41#define NRF_802154_PERIPHERALS_NRF52_H__
42
43#include <nrfx.h>
44#include "nrf_802154_config.h"
45#include "nrf_802154_debug.h"
46#include "hal/nrf_ppi.h"
47#include "nrf_802154_sl_periphs.h"
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
60#ifndef NRF_802154_EGU_INSTANCE_NO
61
62#define NRF_802154_EGU_INSTANCE_NO 0
63
64#endif // NRF_802154_EGU_INSTANCE_NO
65
75#define NRF_802154_EGU_INSTANCE NRFX_CONCAT_2(NRF_EGU, NRF_802154_EGU_INSTANCE_NO)
76
85#define NRF_802154_EGU_IRQ_HANDLER \
86 NRFX_CONCAT_3(NRFX_CONCAT_3(SWI, NRF_802154_EGU_INSTANCE_NO, _EGU), \
87 NRF_802154_EGU_INSTANCE_NO, \
88 _IRQHandler)
89
96#ifndef NRF_802154_RTC_INSTANCE_NO
97
98#define NRF_802154_RTC_INSTANCE_NO 2
99
100#endif // NRF_802154_RTC_INSTANCE_NO
101
115#ifndef NRF_802154_PPI_RADIO_RAMP_UP_TRIGG
116#define NRF_802154_PPI_RADIO_RAMP_UP_TRIGG NRF_PPI_CHANNEL6
117#endif
118
128#ifndef NRF_802154_PPI_RADIO_DISABLED_TO_EGU
129#define NRF_802154_PPI_RADIO_DISABLED_TO_EGU NRF_PPI_CHANNEL6
130#endif
131
140#ifndef NRF_802154_PPI_EGU_TO_RADIO_RAMP_UP
141#define NRF_802154_PPI_EGU_TO_RADIO_RAMP_UP NRF_PPI_CHANNEL7
142#endif
143
152#ifndef NRF_802154_PPI_EGU_TO_TIMER_START
153#define NRF_802154_PPI_EGU_TO_TIMER_START NRF_PPI_CHANNEL8
154#endif
155
166#ifndef NRF_802154_PPI_RADIO_CRCERROR_TO_TIMER_CLEAR
167#define NRF_802154_PPI_RADIO_CRCERROR_TO_TIMER_CLEAR NRF_PPI_CHANNEL9
168#endif
169
180#ifndef NRF_802154_PPI_RADIO_CCAIDLE_TO_FEM_GPIOTE
181#define NRF_802154_PPI_RADIO_CCAIDLE_TO_FEM_GPIOTE NRF_PPI_CHANNEL9
182#endif
183
194#ifndef NRF_802154_PPI_TIMER_COMPARE_TO_RADIO_TXEN
195#define NRF_802154_PPI_TIMER_COMPARE_TO_RADIO_TXEN NRF_PPI_CHANNEL9
196#endif
197
207#ifndef NRF_802154_PPI_RADIO_CCABUSY_TO_RADIO_CCASTART
208#define NRF_802154_PPI_RADIO_CCABUSY_TO_RADIO_CCASTART NRF_PPI_CHANNEL10
209#endif
210
218#ifndef NRF_802154_PPI_RADIO_SYNC_TO_EGU_SYNC
219#define NRF_802154_PPI_RADIO_SYNC_TO_EGU_SYNC NRF_PPI_CHANNEL11
220#endif
221
222#define NRF_802154_DISABLE_BCC_MATCHING_PPI_CHANNELS_USED_MASK \
223 (1 << NRF_802154_PPI_RADIO_SYNC_TO_EGU_SYNC)
224
233#ifndef NRF_802154_PPI_CORE_GROUP
234#define NRF_802154_PPI_CORE_GROUP NRF_PPI_CHANNEL_GROUP0
235#endif
236
243#ifndef NRF_802154_PPI_ABORT_GROUP
244#define NRF_802154_PPI_ABORT_GROUP NRF_PPI_CHANNEL_GROUP1
245#endif
246
252#ifndef NRF_802154_EGU_USED_MASK
253#define NRF_802154_EGU_USED_MASK (1 << NRF_802154_EGU_INSTANCE_NO)
254#endif
255
261#ifndef NRF_802154_PPI_CHANNELS_USED_MASK
262#define NRF_802154_PPI_CHANNELS_USED_MASK ((1 << NRF_802154_PPI_RADIO_DISABLED_TO_EGU) | \
263 (1 << NRF_802154_PPI_RADIO_RAMP_UP_TRIGG) | \
264 (1 << NRF_802154_PPI_EGU_TO_RADIO_RAMP_UP) | \
265 (1 << NRF_802154_PPI_EGU_TO_TIMER_START) | \
266 (1 << NRF_802154_PPI_RADIO_CRCERROR_TO_TIMER_CLEAR) | \
267 (1 << NRF_802154_PPI_RADIO_CCAIDLE_TO_FEM_GPIOTE) | \
268 (1 << NRF_802154_PPI_TIMER_COMPARE_TO_RADIO_TXEN) | \
269 (1 << NRF_802154_PPI_RADIO_CCABUSY_TO_RADIO_CCASTART) | \
270 NRF_802154_DISABLE_BCC_MATCHING_PPI_CHANNELS_USED_MASK | \
271 NRF_802154_SL_PPI_CHANNELS_USED_MASK | \
272 NRF_802154_DEBUG_PPI_CHANNELS_USED_MASK)
273#endif // NRF_802154_PPI_CHANNELS_USED_MASK
274
280#ifndef NRF_802154_PPI_GROUPS_USED_MASK
281#define NRF_802154_PPI_GROUPS_USED_MASK ((1 << NRF_802154_PPI_CORE_GROUP) | \
282 (1 << NRF_802154_PPI_ABORT_GROUP) )
283#endif // NRF_802154_PPI_GROUPS_USED_MASK
284
285#ifdef __cplusplus
286}
287#endif
288
289#endif // NRF_802154_PERIPHERALS_NRF52_H__