Contiki-NG
Loading...
Searching...
No Matches
cc13xx-cc26xx-conf.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017, George Oikonomou - http://www.spd.gr
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the copyright holder nor the names of its
15 * contributors may be used to endorse or promote products derived
16 * from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29 * OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31/*---------------------------------------------------------------------------*/
32/**
33 * \addtogroup cc26xx
34 * @{
35 *
36 * \file
37 * Header with configuration defines common to all CC13xx/CC26xx platforms
38 */
39/*---------------------------------------------------------------------------*/
40#ifndef CC13XX_CC26XX_CONF_H_
41#define CC13XX_CC26XX_CONF_H_
42/*---------------------------------------------------------------------------*/
43/**
44 * \name Network Stack Configuration
45 *
46 * @{
47 */
48
49/*
50 * If set, the systems keeps the HF crystal oscillator on even when the radio is off.
51 * You need to set this to 1 to use TSCH with its default 2.2ms or larger guard time.
52 */
53#ifndef CC2650_FAST_RADIO_STARTUP
54#define CC2650_FAST_RADIO_STARTUP (MAC_CONF_WITH_TSCH)
55#endif
56
57/* Number of Prop Mode RX buffers */
58#ifndef PROP_MODE_CONF_RX_BUF_CNT
59#define PROP_MODE_CONF_RX_BUF_CNT 4
60#endif
61
62/*
63 * Auto-configure Prop-mode radio if we are running on CC13xx, unless the
64 * project has specified otherwise. Depending on the final mode, determine a
65 * default channel (again, if unspecified) and configure RDC params
66 */
67#if CPU_FAMILY_CC13X0
68#ifndef CC13XX_CONF_PROP_MODE
69#define CC13XX_CONF_PROP_MODE 1
70#endif /* CC13XX_CONF_PROP_MODE */
71#endif /* CPU_FAMILY_CC13X0 */
72
73#if CC13XX_CONF_PROP_MODE
74#ifndef NETSTACK_CONF_RADIO
75#define NETSTACK_CONF_RADIO prop_mode_driver
76#endif /* NETSTACK_CONF_RADIO */
77
78/* Channels count from 0 upwards in IEEE 802.15.4g */
79#ifndef IEEE802154_CONF_DEFAULT_CHANNEL
80#define IEEE802154_CONF_DEFAULT_CHANNEL 0
81#endif /* IEEE802154_CONF_DEFAULT_CHANNEL */
82
83#ifndef CSMA_CONF_ACK_WAIT_TIME
84#define CSMA_CONF_ACK_WAIT_TIME (RTIMER_SECOND / 400)
85#endif /* CSMA_CONF_ACK_WAIT_TIME */
86
87#ifndef CSMA_CONF_AFTER_ACK_DETECTED_WAIT_TIME
88#define CSMA_CONF_AFTER_ACK_DETECTED_WAIT_TIME (RTIMER_SECOND / 1000)
89#endif /* CSMA_CONF_AFTER_ACK_DETECTED_WAIT_TIME */
90
91#ifndef CSMA_CONF_SEND_SOFT_ACK
92#define CSMA_CONF_SEND_SOFT_ACK 1
93#endif /* CSMA_CONF_SEND_SOFT_ACK */
94
95#else /* CC13XX_CONF_PROP_MODE */
96#ifndef NETSTACK_CONF_RADIO
97#define NETSTACK_CONF_RADIO ieee_mode_driver
98#endif
99
100#define CSMA_CONF_SEND_SOFT_ACK 0
101#endif /* CC13XX_CONF_PROP_MODE */
102
103/* Platform-specific (H/W) AES implementation */
104#ifndef AES_128_CONF
105#define AES_128_CONF cc26xx_aes_128_driver
106#endif /* AES_128_CONF */
107/** @} */
108/*---------------------------------------------------------------------------*/
109/**
110 * \name IEEE address configuration
111 *
112 * Used to generate our link-local & IPv6 address
113 * @{
114 */
115/**
116 * \brief Location of the IEEE address
117 * 0 => Read from InfoPage,
118 * 1 => Use a hardcoded address, configured by IEEE_ADDR_CONF_ADDRESS
119 */
120#ifndef IEEE_ADDR_CONF_HARDCODED
121#define IEEE_ADDR_CONF_HARDCODED 0
122#endif
123
124/**
125 * \brief The hardcoded IEEE address to be used when IEEE_ADDR_CONF_HARDCODED
126 * is defined as 1
127 */
128#ifndef IEEE_ADDR_CONF_ADDRESS
129#define IEEE_ADDR_CONF_ADDRESS { 0x00, 0x12, 0x4B, 0x00, 0x89, 0xAB, 0xCD, 0xEF }
130#endif
131/** @} */
132/*---------------------------------------------------------------------------*/
133/**
134 * \name RF configuration
135 *
136 * @{
137 */
138/* RF Config */
139
140#ifndef IEEE_MODE_CONF_AUTOACK
141#define IEEE_MODE_CONF_AUTOACK 1 /**< RF H/W generates ACKs */
142#endif
143
144#ifndef IEEE_MODE_CONF_PROMISCOUS
145#define IEEE_MODE_CONF_PROMISCOUS 0 /**< 1 to enable promiscous mode */
146#endif
147
148#ifndef RF_BLE_CONF_ENABLED
149#define RF_BLE_CONF_ENABLED 0 /**< 0 to disable BLE support */
150#endif
151/** @} */
152/*---------------------------------------------------------------------------*/
153
154/* Deprecation warning for UART config */
155#ifdef CC26XX_UART_CONF_ENABLE
156#error CC26XX_UART_CONF_ENABLE is deprecated. Use TI_UART_CONF_ENABLE.
157#endif
158#ifdef CC26XX_UART_CONF_BAUD_RATE
159#error CC26XX_UART_CONF_BAUD_RATE is deprecated. Use TI_UART_CONF_BAUD_RATE.
160#endif
161
162/**
163 * \name Character I/O Configuration
164 *
165 * @{
166 */
167#ifndef TI_UART_CONF_ENABLE
168#define TI_UART_CONF_ENABLE 1 /**< Enable/Disable UART I/O */
169#endif
170
171#ifndef TI_UART_CONF_BAUD_RATE
172#define TI_UART_CONF_BAUD_RATE 115200 /**< Default UART0 baud rate */
173#endif
174
175/* Enable I/O over the Debugger Devpack - Only relevant for the SensorTag */
176#ifndef BOARD_CONF_DEBUGGER_DEVPACK
177#define BOARD_CONF_DEBUGGER_DEVPACK 1
178#endif
179
180#ifndef SLIP_ARCH_CONF_ENABLED
181/*
182 * Determine whether we need SLIP
183 * This will keep working while UIP_FALLBACK_INTERFACE and CMD_CONF_OUTPUT
184 * keep using SLIP
185 */
186#if defined(UIP_FALLBACK_INTERFACE) || defined(CMD_CONF_OUTPUT)
187#define SLIP_ARCH_CONF_ENABLED 1
188#endif
189#endif
190/** @} */
191/*---------------------------------------------------------------------------*/
192/**
193 * \name JTAG interface configuration
194 *
195 * Enable/Disable the JTAG DAP and TAP interfaces on the chip.
196 * Setting this to 1 will disable access to the debug interface
197 * to secure deployed images.
198 * @{
199 */
200#ifndef CCFG_CONF_JTAG_INTERFACE_DISABLE
201#define CCFG_CONF_JTAG_INTERFACE_DISABLE 0
202#endif
203/** @} */
204/*---------------------------------------------------------------------------*/
205/**
206 * \name ROM Bootloader configuration
207 *
208 * Enable/Disable the ROM bootloader in your image, if the board supports it.
209 * Look in board.h to choose the DIO and corresponding level that will cause
210 * the chip to enter bootloader mode.
211 * @{
212 */
213
214/* Backward compatibility */
215#ifdef ROM_BOOTLOADER_ENABLE
216#define CCFG_CONF_ROM_BOOTLOADER_ENABLE ROM_BOOTLOADER_ENABLE
217#endif
218
219#ifndef CCFG_CONF_ROM_BOOTLOADER_ENABLE
220#define CCFG_CONF_ROM_BOOTLOADER_ENABLE 1
221#endif
222/** @} */
223/*---------------------------------------------------------------------------*/
224#endif /* CC13XX_CC26XX_CONF_H_ */
225/*---------------------------------------------------------------------------*/
226/** @} */