Contiki-NG
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  * \name Character I/O Configuration
155  *
156  * @{
157  */
158 #ifndef CC26XX_UART_CONF_ENABLE
159 #define CC26XX_UART_CONF_ENABLE 1 /**< Enable/Disable UART I/O */
160 #endif
161 
162 #ifndef CC26XX_UART_CONF_BAUD_RATE
163 #define CC26XX_UART_CONF_BAUD_RATE 115200 /**< Default UART0 baud rate */
164 #endif
165 
166 /* Enable I/O over the Debugger Devpack - Only relevant for the SensorTag */
167 #ifndef BOARD_CONF_DEBUGGER_DEVPACK
168 #define BOARD_CONF_DEBUGGER_DEVPACK 1
169 #endif
170 
171 #ifndef SLIP_ARCH_CONF_ENABLED
172 /*
173  * Determine whether we need SLIP
174  * This will keep working while UIP_FALLBACK_INTERFACE and CMD_CONF_OUTPUT
175  * keep using SLIP
176  */
177 #if defined(UIP_FALLBACK_INTERFACE) || defined(CMD_CONF_OUTPUT)
178 #define SLIP_ARCH_CONF_ENABLED 1
179 #endif
180 #endif
181 /** @} */
182 /*---------------------------------------------------------------------------*/
183 /**
184  * \name JTAG interface configuration
185  *
186  * Enable/Disable the JTAG DAP and TAP interfaces on the chip.
187  * Setting this to 0 will disable access to the debug interface
188  * to secure deployed images.
189  * @{
190  */
191 #ifndef CCXXWARE_CONF_JTAG_INTERFACE_ENABLE
192 #define CCXXWARE_CONF_JTAG_INTERFACE_ENABLE 1
193 #endif
194 /** @} */
195 /*---------------------------------------------------------------------------*/
196 /**
197  * \name ROM Bootloader configuration
198  *
199  * Enable/Disable the ROM bootloader in your image, if the board supports it.
200  * Look in board.h to choose the DIO and corresponding level that will cause
201  * the chip to enter bootloader mode.
202  * @{
203  */
204 
205 /* Backward compatibility */
206 #ifdef ROM_BOOTLOADER_ENABLE
207 #define CCXXWARE_CONF_ROM_BOOTLOADER_ENABLE ROM_BOOTLOADER_ENABLE
208 #endif
209 
210 #ifndef CCXXWARE_CONF_ROM_BOOTLOADER_ENABLE
211 #define CCXXWARE_CONF_ROM_BOOTLOADER_ENABLE 1
212 #endif
213 /** @} */
214 /*---------------------------------------------------------------------------*/
215 #endif /* CC13XX_CC26XX_CONF_H_ */
216 /*---------------------------------------------------------------------------*/
217 /** @} */