Contiki-NG
Loading...
Searching...
No Matches
nrf_802154_project_config.h
1/*
2 * Copyright (c) 2026, RISE Research Institutes of Sweden AB
3 * All rights reserved.
4 *
5 * Author: Joakim Eriksson <joakim.eriksson@ri.se>
6 *
7 * SPDX-License-Identifier: BSD-3-Clause
8 *
9 * nrf_802154 library configuration for the Contiki-NG nRF54L15 port.
10 */
11
12#ifndef NRF_802154_PROJECT_CONFIG_H_
13#define NRF_802154_PROJECT_CONFIG_H_
14
15/* On nRF54LX the driver owns the RADIO IRQ directly. */
16#define NRF_802154_INTERNAL_RADIO_IRQ_HANDLING 1
17#define NRF_802154_INTERNAL_SWI_IRQ_HANDLING 0
18
19/* Use direct (non-SWI) notification/request to avoid EGU dependency. */
20#define NRF_802154_NOTIFICATION_IMPL NRF_802154_NOTIFICATION_IMPL_DIRECT
21#define NRF_802154_REQUEST_IMPL NRF_802154_REQUEST_IMPL_DIRECT
22
23/* CCA defaults (ED mode, threshold/correlation values) used by nrf_802154. */
24#define NRF_802154_CCA_MODE_DEFAULT NRF_RADIO_CCA_MODE_ED
25#define NRF_802154_CCA_ED_THRESHOLD_DBM_DEFAULT (-75)
26#define NRF_802154_CCA_CORR_THRESHOLD_DEFAULT 45
27#define NRF_802154_CCA_CORR_LIMIT_DEFAULT 2
28#define NRF_802154_PENDING_SHORT_ADDRESSES 16
29#define NRF_802154_PENDING_EXTENDED_ADDRESSES 16
30#define NRF_802154_RX_BUFFERS 20
31
32/* Match Nordic's SL-opensource integration: frame timestamping is disabled. */
33#define NRF_802154_FRAME_TIMESTAMP_ENABLED 0
34
35/* nRF54L15 on the application core needs extra ACK turnaround slack on this
36 * bare-metal Contiki port; the timer backend reduces but does not eliminate
37 * the remaining scheduling gap. */
38#define NRF_802154_ACK_IFS_EXTRA_TIME_US 160U
39
40/* Disable features not available in the open-source SL or not needed. */
41#define NRF_802154_ENCRYPTION_ENABLED 0
42#define NRF_802154_IE_WRITER_ENABLED 0
43#define NRF_802154_SECURITY_WRITER_ENABLED 0
44#define NRF_802154_CSMA_CA_ENABLED 0
45#define NRF_802154_DELAYED_TRX_ENABLED 0
46#define NRF_802154_ACK_TIMEOUT_ENABLED 1
47#define NRF_802154_IFS_ENABLED 0
48#define NRF_802154_CARRIER_FUNCTIONS_ENABLED 0
49#define NRF_802154_TEST_MODES_ENABLED 0
50
51/* Do not report CRC errors to keep things simple. */
52#define NRF_802154_NOTIFY_CRCERROR 0
53
54/* We do not use the internal serialization. */
55#define NRF_802154_SERIALIZATION_HOST 0
56
57/* Do not use internal includes (no closed-source SL).
58 * The library checks #ifdef, so we must NOT define this at all. */
59#ifdef NRF_802154_USE_INTERNAL_INCLUDES
60#undef NRF_802154_USE_INTERNAL_INCLUDES
61#endif
62
63#endif /* NRF_802154_PROJECT_CONFIG_H_ */