summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorja Martinez2016-10-04 15:06:44 -0500
committerBorja Martinez2016-10-04 15:06:44 -0500
commit5d15116da8afd2d000728db962c0e768e38fa44e (patch)
treef0ea17a3b434f7372d32967f96ff1074d0fc9f23
parent0325652a1832d6f2120a87f7d9dd0892f20ba39d (diff)
downloadi3-mote-5d15116da8afd2d000728db962c0e768e38fa44e.tar.gz
i3-mote-5d15116da8afd2d000728db962c0e768e38fa44e.tar.xz
i3-mote-5d15116da8afd2d000728db962c0e768e38fa44e.zip
Added Board Files for CC2650
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_DAC8730/CC2650_I3M.h324
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/CC2650_I3M.c640
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/CC2650_I3M.h324
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/main.c12
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_Blink/CC2650_I3M.c640
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_Blink/main.c4
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/CC2650_I3M.c640
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/CC2650_I3M.h324
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/main.c2
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_I2C_Sensors/CC2650_I3M.c640
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_I2C_Sensors/CC2650_I3M.h324
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_I2C_Sensors/main.c239
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_I2C_Sensors/uart_printf.c17
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_I2C_Sensors/uart_printf.h3
-rw-r--r--Basic-Test-Package/CC2650/board/CC2650_I3M.c (renamed from Basic-Test-Package/CC2650/Test_CC2650_3wSPI_DAC8730/CC2650_I3M.c)29
-rw-r--r--Basic-Test-Package/CC2650/board/CC2650_I3M.h (renamed from Basic-Test-Package/CC2650/Test_CC2650_Blink/CC2650_I3M.h)19
16 files changed, 233 insertions, 3948 deletions
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_DAC8730/CC2650_I3M.h b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_DAC8730/CC2650_I3M.h
deleted file mode 100644
index 1ab67d2..0000000
--- a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_DAC8730/CC2650_I3M.h
+++ /dev/null
@@ -1,324 +0,0 @@
1/*
2 * Copyright (c) 2015-2016, Texas Instruments Incorporated
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 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32/** ============================================================================
33 * @file CC2650_I3MOTE.h
34 *
35 * @brief CC2650 LaunchPad Board Specific header file.
36 *
37 * NB! This is the board file for CC2650 LaunchPad PCB version 1.1
38 *
39 * ============================================================================
40 */
41#ifndef __CC2650_I3MOTE_BOARD_H__
42#define __CC2650_I3MOTE_BOARD_H__
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/** ============================================================================
49 * Includes
50 * ==========================================================================*/
51#include <ti/drivers/PIN.h>
52#include <driverlib/ioc.h>
53
54/** ============================================================================
55 * Externs
56 * ==========================================================================*/
57extern const PIN_Config BoardGpioInitTable[];
58
59/** ============================================================================
60 * Defines
61 * ==========================================================================*/
62
63/* Same RF Configuration as 7x7 EM */
64#define CC2650EM_7ID
65#define CC2650_I3MOTE
66
67
68/* Sensors */
69#define Board_INA219_ADDR (0x41)
70#define Board_HDC1000_ADDR (0x43)
71#define Board_HDC1080_ADDR (0x40)
72#define Board_TMP007_ADDR (0x44)
73#define Board_OPT3001_ADDR (0x45)
74#define Board_MPU9250_ADDR (0x68)
75#define Board_BMP280_ADDR (0x77)
76
77
78/* Mapping of pins to board signals using general board aliases
79 * <board signal alias> <pin mapping>
80 */
81/* Discrete outputs */
82/* I2C */
83
84#define Board_I2C0_SDA0 IOID_23
85#define Board_I2C0_SCL0 IOID_24
86
87#define Board_LEDR IOID_5
88#define Board_LEDG IOID_6
89
90#define Board_LED_ON 1
91#define Board_LED_OFF 0
92
93/* Discrete inputs */
94#define Board_BTN1 IOID_4
95#define Board_BTN2 PIN_UNASSIGNED
96
97/* Debug UART */
98#define Board_UART_RX IOID_2 /* RXD */
99#define Board_UART_TX IOID_3 /* TXD */
100
101/* DAC8730 UART */
102//#define Board_UART_TX IOID_8 /* TCD to DAC*/
103//#define Board_UART_RX IOID_9 /* RXD from DAC */
104
105/* SPI Board */
106#define Board_SPI0_IRQ IOID_10
107#define Board_SPI0_MISO IOID_12
108#define Board_SPI0_MOSI IOID_13
109#define Board_SPI0_CLK IOID_14
110#define Board_SPI0_CSN IOID_15
111
112#define Board_SPI1_MISO IOID_18
113#define Board_SPI1_MOSI IOID_19
114#define Board_SPI1_CLK IOID_20
115#define Board_SPI1_CSN IOID_21
116#define Board_SPI1_IRQ IOID_22
117
118/* Power */
119//#define Board_DIO0 IOID_0 // VCCIO_DAC
120//#define Board_DIO1 IOID_1 // GPS_PWR_nEN
121//#define Board_DIO7 IOID_7 // EH_nBYPASS
122//#define Board_DIO25 IOID_25 // SSM_PWR_nEN
123//#define Board_DIO26 IOID_26 // GPS_PWR_nEN
124//#define Board_DIO27 IOID_27 // VBAT_OK
125//#define Board_DIO28 IOID_28 // SSM_5V_EN
126
127/* Misc */
128//#define Board_DIO11 IOID_11 // BSL
129//#define Board_DIO16 IOID_16 // JTAG_TDO
130//#define Board_DIO17 IOID_17 // JTAG_TDI
131
132
133
134/* Analog */
135#define Board_DIO23_ANALOG PIN_UNASSIGNED
136#define Board_DIO24_ANALOG PIN_UNASSIGNED
137#define Board_DIO25_ANALOG PIN_UNASSIGNED
138#define Board_DIO26_ANALOG PIN_UNASSIGNED
139#define Board_DIO27_ANALOG PIN_UNASSIGNED
140#define Board_DIO28_ANALOG PIN_UNASSIGNED
141#define Board_DIO29_ANALOG PIN_UNASSIGNED
142#define Board_DIO30_ANALOG PIN_UNASSIGNED
143
144
145/* PWM outputs */
146#define Board_PWMPIN0 PIN_UNASSIGNED
147#define Board_PWMPIN1 PIN_UNASSIGNED
148#define Board_PWMPIN2 PIN_UNASSIGNED
149#define Board_PWMPIN3 PIN_UNASSIGNED
150#define Board_PWMPIN4 PIN_UNASSIGNED
151#define Board_PWMPIN5 PIN_UNASSIGNED
152#define Board_PWMPIN6 PIN_UNASSIGNED
153#define Board_PWMPIN7 PIN_UNASSIGNED
154
155
156/** ============================================================================
157 * Instance identifiers
158 * ==========================================================================*/
159/* Generic I2C instance identifiers */
160#define Board_I2C CC2650_I3MOTE_I2C0
161/* Generic SPI instance identifiers */
162#define Board_SPI0 CC2650_I3MOTE_SPI0
163#define Board_SPI1 CC2650_I3MOTE_SPI1
164/* Generic UART instance identifiers */
165#define Board_UART CC2650_I3MOTE_UART0
166/* Generic Crypto instance identifiers */
167#define Board_CRYPTO CC2650_I3MOTE_CRYPTO0
168/* Generic GPTimer instance identifiers */
169#define Board_GPTIMER0A CC2650_I3MOTE_GPTIMER0A
170#define Board_GPTIMER0B CC2650_I3MOTE_GPTIMER0B
171#define Board_GPTIMER1A CC2650_I3MOTE_GPTIMER1A
172#define Board_GPTIMER1B CC2650_I3MOTE_GPTIMER1B
173#define Board_GPTIMER2A CC2650_I3MOTE_GPTIMER2A
174#define Board_GPTIMER2B CC2650_I3MOTE_GPTIMER2B
175#define Board_GPTIMER3A CC2650_I3MOTE_GPTIMER3A
176#define Board_GPTIMER3B CC2650_I3MOTE_GPTIMER3B
177/* Generic PWM instance identifiers */
178#define Board_PWM0 CC2650_I3MOTE_PWM0
179#define Board_PWM1 CC2650_I3MOTE_PWM1
180#define Board_PWM2 CC2650_I3MOTE_PWM2
181#define Board_PWM3 CC2650_I3MOTE_PWM3
182#define Board_PWM4 CC2650_I3MOTE_PWM4
183#define Board_PWM5 CC2650_I3MOTE_PWM5
184#define Board_PWM6 CC2650_I3MOTE_PWM6
185#define Board_PWM7 CC2650_I3MOTE_PWM7
186
187/** ============================================================================
188 * Number of peripherals and their names
189 * ==========================================================================*/
190
191/*!
192 * @def CC2650_I3MOTE_I2CName
193 * @brief Enum of I2C names on the CC2650 dev board
194 */
195typedef enum CC2650_I3MOTE_I2CName {
196 CC2650_I3MOTE_I2C0 = 0,
197
198 CC2650_I3MOTE_I2CCOUNT
199} CC2650_I3MOTE_I2CName;
200
201/*!
202 * @def CC2650_I3MOTE_CryptoName
203 * @brief Enum of Crypto names on the CC2650 dev board
204 */
205typedef enum CC2650_I3MOTE_CryptoName {
206 CC2650_I3MOTE_CRYPTO0 = 0,
207
208 CC2650_I3MOTE_CRYPTOCOUNT
209} CC2650_I3MOTE_CryptoName;
210
211
212/*!
213 * @def CC2650_I3MOTE_SPIName
214 * @brief Enum of SPI names on the CC2650 dev board
215 */
216typedef enum CC2650_I3MOTE_SPIName {
217 CC2650_I3MOTE_SPI0 = 0,
218 CC2650_I3MOTE_SPI1,
219
220 CC2650_I3MOTE_SPICOUNT
221} CC2650_I3MOTE_SPIName;
222
223/*!
224 * @def CC2650_I3MOTE_UARTName
225 * @brief Enum of UARTs on the CC2650 dev board
226 */
227typedef enum CC2650_I3MOTE_UARTName {
228 CC2650_I3MOTE_UART0 = 0,
229
230 CC2650_I3MOTE_UARTCOUNT
231} CC2650_I3MOTE_UARTName;
232
233/*!
234 * @def CC2650_I3MOTE_UdmaName
235 * @brief Enum of DMA buffers
236 */
237typedef enum CC2650_I3MOTE_UdmaName {
238 CC2650_I3MOTE_UDMA0 = 0,
239
240 CC2650_I3MOTE_UDMACOUNT
241} CC2650_I3MOTE_UdmaName;
242
243/*!
244 * @def CC2650_I3MOTE_GPTimerName
245 * @brief Enum of GPTimer parts
246 */
247typedef enum CC2650_I3MOTE_GPTimerName
248{
249 CC2650_I3MOTE_GPTIMER0A = 0,
250 CC2650_I3MOTE_GPTIMER0B,
251 CC2650_I3MOTE_GPTIMER1A,
252 CC2650_I3MOTE_GPTIMER1B,
253 CC2650_I3MOTE_GPTIMER2A,
254 CC2650_I3MOTE_GPTIMER2B,
255 CC2650_I3MOTE_GPTIMER3A,
256 CC2650_I3MOTE_GPTIMER3B,
257 CC2650_I3MOTE_GPTIMERPARTSCOUNT
258} CC2650_I3MOTE_GPTimerName;
259
260/*!
261 * @def CC2650_I3MOTE_GPTimers
262 * @brief Enum of GPTimers
263 */
264typedef enum CC2650_I3MOTE_GPTimers
265{
266 CC2650_I3MOTE_GPTIMER0 = 0,
267 CC2650_I3MOTE_GPTIMER1,
268 CC2650_I3MOTE_GPTIMER2,
269 CC2650_I3MOTE_GPTIMER3,
270 CC2650_I3MOTE_GPTIMERCOUNT
271} CC2650_I3MOTE_GPTimers;
272
273/*!
274 * @def CC2650_I3MOTE_PWM
275 * @brief Enum of PWM outputs on the board
276 */
277typedef enum CC2650_I3MOTE_PWM
278{
279 CC2650_I3MOTE_PWM0 = 0,
280 CC2650_I3MOTE_PWM1,
281 CC2650_I3MOTE_PWM2,
282 CC2650_I3MOTE_PWM3,
283 CC2650_I3MOTE_PWM4,
284 CC2650_I3MOTE_PWM5,
285 CC2650_I3MOTE_PWM6,
286 CC2650_I3MOTE_PWM7,
287 CC2650_I3MOTE_PWMCOUNT
288} CC2650_I3MOTE_PWM;
289
290/*!
291 * @def CC2650_I3MOTE_ADCBufName
292 * @brief Enum of ADCs
293 */
294typedef enum CC2650_I3MOTE_ADCBufName {
295 CC2650_I3MOTE_ADCBuf0 = 0,
296 CC2650_I3MOTE_ADCBufCOUNT
297} CC2650_I3MOTE_ADCBufName;
298
299
300/*!
301 * @def CC2650_I3MOTE_ADCName
302 * @brief Enum of ADCs
303 */
304typedef enum CC2650_I3MOTE_ADCName {
305 CC2650_I3MOTE_ADC0 = 0,
306 CC2650_I3MOTE_ADC1,
307 CC2650_I3MOTE_ADC2,
308 CC2650_I3MOTE_ADC3,
309 CC2650_I3MOTE_ADC4,
310 CC2650_I3MOTE_ADC5,
311 CC2650_I3MOTE_ADC6,
312 CC2650_I3MOTE_ADC7,
313 CC2650_I3MOTE_ADCDCOUPL,
314 CC2650_I3MOTE_ADCVSS,
315 CC2650_I3MOTE_ADCVDDS,
316 CC2650_I3MOTE_ADCCOUNT
317} CC2650_I3MOTE_ADCName;
318
319
320#ifdef __cplusplus
321}
322#endif
323
324#endif /* __CC2650_I3MOTE_BOARD_H__ */
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/CC2650_I3M.c b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/CC2650_I3M.c
deleted file mode 100644
index f3e0087..0000000
--- a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/CC2650_I3M.c
+++ /dev/null
@@ -1,640 +0,0 @@
1/*
2 * Copyright (c) 2016, Texas Instruments Incorporated
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 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/*
34 * ====================== CC2650_I3MOTE.c ===================================
35 * This file is responsible for setting up the board specific items for the
36 * CC2650 LaunchPad.
37 */
38
39
40/*
41 * ====================== Includes ============================================
42 */
43#include <xdc/std.h>
44#include <xdc/runtime/System.h>
45
46#include <ti/sysbios/family/arm/m3/Hwi.h>
47#include <ti/drivers/PIN.h>
48#include <ti/drivers/pin/PINCC26XX.h>
49#include <ti/drivers/PWM.h>
50#include <ti/drivers/pwm/PWMTimerCC26XX.h>
51#include <ti/drivers/timer/GPTimerCC26XX.h>
52#include <ti/drivers/Power.h>
53#include <ti/drivers/power/PowerCC26XX.h>
54
55#include <inc/hw_memmap.h>
56#include <inc/hw_ints.h>
57#include <driverlib/ioc.h>
58#include <driverlib/udma.h>
59
60#include <Board.h>
61
62/*
63 * ========================= IO driver initialization =========================
64 * From main, PIN_init(BoardGpioInitTable) should be called to setup safe
65 * settings for this board.
66 * When a pin is allocated and then de-allocated, it will revert to the state
67 * configured in this table.
68 */
69/* Place into subsections to allow the TI linker to remove items properly */
70#if defined(__TI_COMPILER_VERSION__)
71#pragma DATA_SECTION(BoardGpioInitTable, ".const:BoardGpioInitTable")
72#pragma DATA_SECTION(PINCC26XX_hwAttrs, ".const:PINCC26XX_hwAttrs")
73#endif
74
75const PIN_Config BoardGpioInitTable[] = {
76
77 Board_LEDR | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
78 Board_LEDG | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
79 Board_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
80 Board_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, /* UART RX via debugger back channel */
81 Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* UART TX via debugger back channel */
82 PIN_TERMINATE
83};
84
85const PINCC26XX_HWAttrs PINCC26XX_hwAttrs = {
86 .intPriority = ~0,
87 .swiPriority = 0
88};
89/*============================================================================*/
90
91/*
92 * ============================= Power begin ==================================
93 */
94/* Place into subsections to allow the TI linker to remove items properly */
95#if defined(__TI_COMPILER_VERSION__)
96#pragma DATA_SECTION(PowerCC26XX_config, ".const:PowerCC26XX_config")
97#endif
98const PowerCC26XX_Config PowerCC26XX_config = {
99 .policyInitFxn = NULL,
100 .policyFxn = &PowerCC26XX_standbyPolicy,
101 .calibrateFxn = &PowerCC26XX_calibrate,
102 .enablePolicy = TRUE,
103 .calibrateRCOSC_LF = TRUE,
104 .calibrateRCOSC_HF = TRUE,
105};
106/*
107 * ============================= Power end ====================================
108 */
109
110/*
111 * ============================= UART begin ===================================
112 */
113/* Place into subsections to allow the TI linker to remove items properly */
114#if defined(__TI_COMPILER_VERSION__)
115#pragma DATA_SECTION(UART_config, ".const:UART_config")
116#pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
117#endif
118
119/* Include drivers */
120#include <ti/drivers/UART.h>
121#include <ti/drivers/uart/UARTCC26XX.h>
122
123/* UART objects */
124UARTCC26XX_Object uartCC26XXObjects[CC2650_I3MOTE_UARTCOUNT];
125
126/* UART hardware parameter structure, also used to assign UART pins */
127const UARTCC26XX_HWAttrsV1 uartCC26XXHWAttrs[CC2650_I3MOTE_UARTCOUNT] = {
128 {
129 .baseAddr = UART0_BASE,
130 .powerMngrId = PowerCC26XX_PERIPH_UART0,
131 .intNum = INT_UART0_COMB,
132 .intPriority = ~0,
133 .swiPriority = 0,
134 .txPin = Board_UART_TX,
135 .rxPin = Board_UART_RX,
136 .ctsPin = PIN_UNASSIGNED,
137 .rtsPin = PIN_UNASSIGNED
138 }
139};
140
141/* UART configuration structure */
142const UART_Config UART_config[] = {
143 {
144 .fxnTablePtr = &UARTCC26XX_fxnTable,
145 .object = &uartCC26XXObjects[0],
146 .hwAttrs = &uartCC26XXHWAttrs[0]
147 },
148 {NULL, NULL, NULL}
149};
150/*
151 * ============================= UART end =====================================
152 */
153
154/*
155 * ============================= UDMA begin ===================================
156 */
157/* Place into subsections to allow the TI linker to remove items properly */
158#if defined(__TI_COMPILER_VERSION__)
159#pragma DATA_SECTION(UDMACC26XX_config, ".const:UDMACC26XX_config")
160#pragma DATA_SECTION(udmaHWAttrs, ".const:udmaHWAttrs")
161#endif
162
163/* Include drivers */
164#include <ti/drivers/dma/UDMACC26XX.h>
165
166/* UDMA objects */
167UDMACC26XX_Object udmaObjects[CC2650_I3MOTE_UDMACOUNT];
168
169/* UDMA configuration structure */
170const UDMACC26XX_HWAttrs udmaHWAttrs[CC2650_I3MOTE_UDMACOUNT] = {
171 {
172 .baseAddr = UDMA0_BASE,
173 .powerMngrId = PowerCC26XX_PERIPH_UDMA,
174 .intNum = INT_DMA_ERR,
175 .intPriority = ~0
176 }
177};
178
179/* UDMA configuration structure */
180const UDMACC26XX_Config UDMACC26XX_config[] = {
181 {
182 .object = &udmaObjects[0],
183 .hwAttrs = &udmaHWAttrs[0]
184 },
185 {NULL, NULL}
186};
187/*
188 * ============================= UDMA end =====================================
189 */
190
191/*
192 * ========================== SPI DMA begin ===================================
193 */
194/* Place into subsections to allow the TI linker to remove items properly */
195#if defined(__TI_COMPILER_VERSION__)
196#pragma DATA_SECTION(SPI_config, ".const:SPI_config")
197#pragma DATA_SECTION(spiCC26XXDMAHWAttrs, ".const:spiCC26XXDMAHWAttrs")
198#endif
199
200/* Include drivers */
201#include <ti/drivers/spi/SPICC26XXDMA.h>
202
203/* SPI objects */
204SPICC26XXDMA_Object spiCC26XXDMAObjects[CC2650_I3MOTE_SPICOUNT];
205
206/* SPI configuration structure, describing which pins are to be used */
207const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2650_I3MOTE_SPICOUNT] = {
208 {
209 .baseAddr = SSI0_BASE,
210 .intNum = INT_SSI0_COMB,
211 .intPriority = ~0,
212 .swiPriority = 0,
213 .powerMngrId = PowerCC26XX_PERIPH_SSI0,
214 .defaultTxBufValue = 0,
215 .rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
216 .txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
217 .mosiPin = Board_SPI0_MOSI,
218 .misoPin = Board_SPI0_MISO,
219 .clkPin = Board_SPI0_CLK,
220 .csnPin = Board_SPI0_CSN
221 },
222 {
223 .baseAddr = SSI1_BASE,
224 .intNum = INT_SSI1_COMB,
225 .intPriority = ~0,
226 .swiPriority = 0,
227 .powerMngrId = PowerCC26XX_PERIPH_SSI1,
228 .defaultTxBufValue = 0,
229 .rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
230 .txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
231 .mosiPin = Board_SPI1_MOSI,
232 .misoPin = Board_SPI1_MISO,
233 .clkPin = Board_SPI1_CLK,
234 .csnPin = Board_SPI1_CSN
235 }
236};
237
238/* SPI configuration structure */
239const SPI_Config SPI_config[] = {
240 {
241 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
242 .object = &spiCC26XXDMAObjects[0],
243 .hwAttrs = &spiCC26XXDMAHWAttrs[0]
244 },
245 {
246 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
247 .object = &spiCC26XXDMAObjects[1],
248 .hwAttrs = &spiCC26XXDMAHWAttrs[1]
249 },
250 {NULL, NULL, NULL}
251};
252/*
253 * ========================== SPI DMA end =====================================
254*/
255
256
257/*
258 * ============================= I2C Begin=====================================
259*/
260/* Place into subsections to allow the TI linker to remove items properly */
261#if defined(__TI_COMPILER_VERSION__)
262#pragma DATA_SECTION(I2C_config, ".const:I2C_config")
263#pragma DATA_SECTION(i2cCC26xxHWAttrs, ".const:i2cCC26xxHWAttrs")
264#endif
265
266/* Include drivers */
267#include <ti/drivers/i2c/I2CCC26XX.h>
268
269/* I2C objects */
270I2CCC26XX_Object i2cCC26xxObjects[CC2650_I3MOTE_I2CCOUNT];
271
272/* I2C configuration structure, describing which pins are to be used */
273const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_I3MOTE_I2CCOUNT] = {
274 {
275 .baseAddr = I2C0_BASE,
276 .powerMngrId = PowerCC26XX_PERIPH_I2C0,
277 .intNum = INT_I2C_IRQ,
278 .intPriority = ~0,
279 .swiPriority = 0,
280 .sdaPin = Board_I2C0_SDA0,
281 .sclPin = Board_I2C0_SCL0,
282 }
283};
284
285/* I2C configuration structure */
286const I2C_Config I2C_config[] = {
287 {
288 .fxnTablePtr = &I2CCC26XX_fxnTable,
289 .object = &i2cCC26xxObjects[0],
290 .hwAttrs = &i2cCC26xxHWAttrs[0]
291 },
292 {NULL, NULL, NULL}
293};
294/*
295 * ========================== I2C end =========================================
296 */
297
298/*
299 * ========================== Crypto begin ====================================
300 * NOTE: The Crypto implementation should be considered experimental
301 * and not validated!
302 */
303/* Place into subsections to allow the TI linker to remove items properly */
304#if defined(__TI_COMPILER_VERSION__)
305#pragma DATA_SECTION(CryptoCC26XX_config, ".const:CryptoCC26XX_config")
306#pragma DATA_SECTION(cryptoCC26XXHWAttrs, ".const:cryptoCC26XXHWAttrs")
307#endif
308
309/* Include drivers */
310#include <ti/drivers/crypto/CryptoCC26XX.h>
311
312/* Crypto objects */
313CryptoCC26XX_Object cryptoCC26XXObjects[CC2650_I3MOTE_CRYPTOCOUNT];
314
315/* Crypto configuration structure, describing which pins are to be used */
316const CryptoCC26XX_HWAttrs cryptoCC26XXHWAttrs[CC2650_I3MOTE_CRYPTOCOUNT] = {
317 {
318 .baseAddr = CRYPTO_BASE,
319 .powerMngrId = PowerCC26XX_PERIPH_CRYPTO,
320 .intNum = INT_CRYPTO_RESULT_AVAIL_IRQ,
321 .intPriority = ~0,
322 }
323};
324
325/* Crypto configuration structure */
326const CryptoCC26XX_Config CryptoCC26XX_config[] = {
327 {
328 .object = &cryptoCC26XXObjects[0],
329 .hwAttrs = &cryptoCC26XXHWAttrs[0]
330 },
331 {NULL, NULL}
332};
333/*
334 * ========================== Crypto end ======================================
335 */
336
337
338/*
339 * ========================= RF driver begin ==================================
340 */
341/* Place into subsections to allow the TI linker to remove items properly */
342#if defined(__TI_COMPILER_VERSION__)
343#pragma DATA_SECTION(RFCC26XX_hwAttrs, ".const:RFCC26XX_hwAttrs")
344#endif
345
346/* Include drivers */
347#include <ti/drivers/rf/RF.h>
348
349/* RF hwi and swi priority */
350const RFCC26XX_HWAttrs RFCC26XX_hwAttrs = {
351 .hwiCpe0Priority = ~0,
352 .hwiHwPriority = ~0,
353 .swiCpe0Priority = 0,
354 .swiHwPriority = 0,
355};
356
357/*
358 * ========================== RF driver end ===================================
359 */
360
361/*
362 * ========================= Display begin ====================================
363 */
364
365/*
366 * ========================= Display end ======================================
367 */
368
369/*
370 * ============================ GPTimer begin =================================
371 * Remove unused entries to reduce flash usage both in Board.c and Board.h
372 */
373/* Place into subsections to allow the TI linker to remove items properly */
374#if defined(__TI_COMPILER_VERSION__)
375#pragma DATA_SECTION(GPTimerCC26XX_config, ".const:GPTimerCC26XX_config")
376#pragma DATA_SECTION(gptimerCC26xxHWAttrs, ".const:gptimerCC26xxHWAttrs")
377#endif
378
379/* GPTimer hardware attributes, one per timer part (Timer 0A, 0B, 1A, 1B..) */
380const GPTimerCC26XX_HWAttrs gptimerCC26xxHWAttrs[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
381 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0A, },
382 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0B, },
383 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1A, },
384 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1B, },
385 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2A, },
386 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2B, },
387 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3A, },
388 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3B, },
389};
390
391/* GPTimer objects, one per full-width timer (A+B) (Timer 0, Timer 1..) */
392GPTimerCC26XX_Object gptimerCC26XXObjects[CC2650_I3MOTE_GPTIMERCOUNT];
393
394/* GPTimer configuration (used as GPTimer_Handle by driver and application) */
395const GPTimerCC26XX_Config GPTimerCC26XX_config[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
396 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[0], GPT_A },
397 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[1], GPT_B },
398 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[2], GPT_A },
399 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[3], GPT_B },
400 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[4], GPT_A },
401 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[5], GPT_B },
402 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[6], GPT_A },
403 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[7], GPT_B },
404};
405
406/*
407 * ============================ GPTimer end ===================================
408 */
409
410
411
412/*
413 * ============================= PWM begin ====================================
414 * Remove unused entries to reduce flash usage both in Board.c and Board.h
415 */
416/* Place into subsections to allow the TI linker to remove items properly */
417#if defined(__TI_COMPILER_VERSION__)
418#pragma DATA_SECTION(PWM_config, ".const:PWM_config")
419#pragma DATA_SECTION(pwmtimerCC26xxHWAttrs, ".const:pwmtimerCC26xxHWAttrs")
420#endif
421
422/* PWM configuration, one per PWM output. */
423PWMTimerCC26XX_HwAttrs pwmtimerCC26xxHWAttrs[CC2650_I3MOTE_PWMCOUNT] = {
424 { .pwmPin = Board_PWMPIN0, .gpTimerUnit = Board_GPTIMER0A },
425 { .pwmPin = Board_PWMPIN1, .gpTimerUnit = Board_GPTIMER0B },
426 { .pwmPin = Board_PWMPIN2, .gpTimerUnit = Board_GPTIMER1A },
427 { .pwmPin = Board_PWMPIN3, .gpTimerUnit = Board_GPTIMER1B },
428 { .pwmPin = Board_PWMPIN4, .gpTimerUnit = Board_GPTIMER2A },
429 { .pwmPin = Board_PWMPIN5, .gpTimerUnit = Board_GPTIMER2B },
430 { .pwmPin = Board_PWMPIN6, .gpTimerUnit = Board_GPTIMER3A },
431 { .pwmPin = Board_PWMPIN7, .gpTimerUnit = Board_GPTIMER3B },
432};
433
434/* PWM object, one per PWM output */
435PWMTimerCC26XX_Object pwmtimerCC26xxObjects[CC2650_I3MOTE_PWMCOUNT];
436
437extern const PWM_FxnTable PWMTimerCC26XX_fxnTable;
438
439/* PWM configuration (used as PWM_Handle by driver and application) */
440const PWM_Config PWM_config[CC2650_I3MOTE_PWMCOUNT + 1] = {
441 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[0], &pwmtimerCC26xxHWAttrs[0] },
442 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[1], &pwmtimerCC26xxHWAttrs[1] },
443 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[2], &pwmtimerCC26xxHWAttrs[2] },
444 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[3], &pwmtimerCC26xxHWAttrs[3] },
445 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[4], &pwmtimerCC26xxHWAttrs[4] },
446 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[5], &pwmtimerCC26xxHWAttrs[5] },
447 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[6], &pwmtimerCC26xxHWAttrs[6] },
448 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[7], &pwmtimerCC26xxHWAttrs[7] },
449 { NULL, NULL, NULL }
450};
451
452
453/*
454 * ============================= PWM end ======================================
455 */
456
457/*
458 * ========================== ADCBuf begin =========================================
459 */
460/* Place into subsections to allow the TI linker to remove items properly */
461#if defined(__TI_COMPILER_VERSION__)
462#pragma DATA_SECTION(ADCBuf_config, ".const:ADCBuf_config")
463#pragma DATA_SECTION(adcBufCC26xxHWAttrs, ".const:adcBufCC26xxHWAttrs")
464#pragma DATA_SECTION(ADCBufCC26XX_adcChannelLut, ".const:ADCBufCC26XX_adcChannelLut")
465#endif
466
467/* Include drivers */
468#include <ti/drivers/ADCBuf.h>
469#include <ti/drivers/adcbuf/ADCBufCC26XX.h>
470
471/* ADCBuf objects */
472ADCBufCC26XX_Object adcBufCC26xxObjects[CC2650_I3MOTE_ADCBufCOUNT];
473
474/*
475 * This table converts a virtual adc channel into a dio and internal analogue input signal.
476 * This table is necessary for the functioning of the adcBuf driver.
477 * Comment out unused entries to save flash.
478 * Dio and internal signal pairs are hardwired. Do not remap them in the table. You may reorder entire entries though.
479 * The mapping of dio and internal signals is package dependent.
480 */
481const ADCBufCC26XX_AdcChannelLutEntry ADCBufCC26XX_adcChannelLut[] = {
482 {PIN_UNASSIGNED, ADC_COMPB_IN_VDDS},
483 {PIN_UNASSIGNED, ADC_COMPB_IN_DCOUPL},
484 {PIN_UNASSIGNED, ADC_COMPB_IN_VSS},
485 //{Board_DIO23_ANALOG, ADC_COMPB_IN_AUXIO7},
486 //{Board_DIO24_ANALOG, ADC_COMPB_IN_AUXIO6},
487 //{Board_DIO25_ANALOG, ADC_COMPB_IN_AUXIO5},
488 //{Board_DIO26_ANALOG, ADC_COMPB_IN_AUXIO4},
489 //{Board_DIO27_ANALOG, ADC_COMPB_IN_AUXIO3},
490 //{Board_DIO28_ANALOG, ADC_COMPB_IN_AUXIO2},
491 //{Board_DIO29_ANALOG, ADC_COMPB_IN_AUXIO1},
492 //{Board_DIO30_ANALOG, ADC_COMPB_IN_AUXIO0},
493};
494
495const ADCBufCC26XX_HWAttrs adcBufCC26xxHWAttrs[CC2650_I3MOTE_ADCBufCOUNT] = {
496 {
497 .intPriority = ~0,
498 .swiPriority = 0,
499 .adcChannelLut = ADCBufCC26XX_adcChannelLut,
500 .gpTimerUnit = Board_GPTIMER0A,
501 .gptDMAChannelMask = 1 << UDMA_CHAN_TIMER0_A,
502 }
503};
504
505const ADCBuf_Config ADCBuf_config[] = {
506 {&ADCBufCC26XX_fxnTable, &adcBufCC26xxObjects[0], &adcBufCC26xxHWAttrs[0]},
507 {NULL, NULL, NULL},
508};
509/*
510 * ========================== ADCBuf end =========================================
511 */
512
513
514
515/*
516 * ========================== ADC begin =========================================
517 */
518/* Place into subsections to allow the TI linker to remove items properly */
519#if defined(__TI_COMPILER_VERSION__)
520#pragma DATA_SECTION(ADC_config, ".const:ADC_config")
521#pragma DATA_SECTION(adcCC26xxHWAttrs, ".const:adcCC26xxHWAttrs")
522#endif
523
524/* Include drivers */
525#include <ti/drivers/ADC.h>
526#include <ti/drivers/adc/ADCCC26XX.h>
527
528/* ADC objects */
529ADCCC26XX_Object adcCC26xxObjects[CC2650_I3MOTE_ADCCOUNT];
530
531
532const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC2650_I3MOTE_ADCCOUNT] = {
533 {
534 .adcDIO = Board_DIO23_ANALOG,
535 .adcCompBInput = ADC_COMPB_IN_AUXIO7,
536 .refSource = ADCCC26XX_FIXED_REFERENCE,
537 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
538 .inputScalingEnabled = true,
539 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
540 },
541 {
542 .adcDIO = Board_DIO24_ANALOG,
543 .adcCompBInput = ADC_COMPB_IN_AUXIO6,
544 .refSource = ADCCC26XX_FIXED_REFERENCE,
545 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
546 .inputScalingEnabled = true,
547 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
548 },
549 {
550 .adcDIO = Board_DIO25_ANALOG,
551 .adcCompBInput = ADC_COMPB_IN_AUXIO5,
552 .refSource = ADCCC26XX_FIXED_REFERENCE,
553 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
554 .inputScalingEnabled = true,
555 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
556 },
557 {
558 .adcDIO = Board_DIO26_ANALOG,
559 .adcCompBInput = ADC_COMPB_IN_AUXIO4,
560 .refSource = ADCCC26XX_FIXED_REFERENCE,
561 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
562 .inputScalingEnabled = true,
563 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
564 },
565 {
566 .adcDIO = Board_DIO27_ANALOG,
567 .adcCompBInput = ADC_COMPB_IN_AUXIO3,
568 .refSource = ADCCC26XX_FIXED_REFERENCE,
569 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
570 .inputScalingEnabled = true,
571 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
572 },
573 {
574 .adcDIO = Board_DIO28_ANALOG,
575 .adcCompBInput = ADC_COMPB_IN_AUXIO2,
576 .refSource = ADCCC26XX_FIXED_REFERENCE,
577 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
578 .inputScalingEnabled = true,
579 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
580 },
581 {
582 .adcDIO = Board_DIO29_ANALOG,
583 .adcCompBInput = ADC_COMPB_IN_AUXIO1,
584 .refSource = ADCCC26XX_FIXED_REFERENCE,
585 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
586 .inputScalingEnabled = true,
587 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
588 },
589 {
590 .adcDIO = Board_DIO30_ANALOG,
591 .adcCompBInput = ADC_COMPB_IN_AUXIO0,
592 .refSource = ADCCC26XX_FIXED_REFERENCE,
593 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_10P9_MS,
594 .inputScalingEnabled = true,
595 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
596 },
597 {
598 .adcDIO = PIN_UNASSIGNED,
599 .adcCompBInput = ADC_COMPB_IN_DCOUPL,
600 .refSource = ADCCC26XX_FIXED_REFERENCE,
601 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
602 .inputScalingEnabled = true,
603 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
604 },
605 {
606 .adcDIO = PIN_UNASSIGNED,
607 .adcCompBInput = ADC_COMPB_IN_VSS,
608 .refSource = ADCCC26XX_FIXED_REFERENCE,
609 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
610 .inputScalingEnabled = true,
611 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
612 },
613 {
614 .adcDIO = PIN_UNASSIGNED,
615 .adcCompBInput = ADC_COMPB_IN_VDDS,
616 .refSource = ADCCC26XX_FIXED_REFERENCE,
617 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
618 .inputScalingEnabled = true,
619 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
620 }
621};
622
623const ADC_Config ADC_config[] = {
624 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[0], &adcCC26xxHWAttrs[0]},
625 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[1], &adcCC26xxHWAttrs[1]},
626 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[2], &adcCC26xxHWAttrs[2]},
627 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[3], &adcCC26xxHWAttrs[3]},
628 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[4], &adcCC26xxHWAttrs[4]},
629 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[5], &adcCC26xxHWAttrs[5]},
630 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[6], &adcCC26xxHWAttrs[6]},
631 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[7], &adcCC26xxHWAttrs[7]},
632 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[8], &adcCC26xxHWAttrs[8]},
633 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[9], &adcCC26xxHWAttrs[9]},
634 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[10], &adcCC26xxHWAttrs[10]},
635 {NULL, NULL, NULL},
636};
637
638/*
639 * ========================== ADC end =========================================
640 */
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/CC2650_I3M.h b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/CC2650_I3M.h
deleted file mode 100644
index 1ab67d2..0000000
--- a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/CC2650_I3M.h
+++ /dev/null
@@ -1,324 +0,0 @@
1/*
2 * Copyright (c) 2015-2016, Texas Instruments Incorporated
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 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32/** ============================================================================
33 * @file CC2650_I3MOTE.h
34 *
35 * @brief CC2650 LaunchPad Board Specific header file.
36 *
37 * NB! This is the board file for CC2650 LaunchPad PCB version 1.1
38 *
39 * ============================================================================
40 */
41#ifndef __CC2650_I3MOTE_BOARD_H__
42#define __CC2650_I3MOTE_BOARD_H__
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/** ============================================================================
49 * Includes
50 * ==========================================================================*/
51#include <ti/drivers/PIN.h>
52#include <driverlib/ioc.h>
53
54/** ============================================================================
55 * Externs
56 * ==========================================================================*/
57extern const PIN_Config BoardGpioInitTable[];
58
59/** ============================================================================
60 * Defines
61 * ==========================================================================*/
62
63/* Same RF Configuration as 7x7 EM */
64#define CC2650EM_7ID
65#define CC2650_I3MOTE
66
67
68/* Sensors */
69#define Board_INA219_ADDR (0x41)
70#define Board_HDC1000_ADDR (0x43)
71#define Board_HDC1080_ADDR (0x40)
72#define Board_TMP007_ADDR (0x44)
73#define Board_OPT3001_ADDR (0x45)
74#define Board_MPU9250_ADDR (0x68)
75#define Board_BMP280_ADDR (0x77)
76
77
78/* Mapping of pins to board signals using general board aliases
79 * <board signal alias> <pin mapping>
80 */
81/* Discrete outputs */
82/* I2C */
83
84#define Board_I2C0_SDA0 IOID_23
85#define Board_I2C0_SCL0 IOID_24
86
87#define Board_LEDR IOID_5
88#define Board_LEDG IOID_6
89
90#define Board_LED_ON 1
91#define Board_LED_OFF 0
92
93/* Discrete inputs */
94#define Board_BTN1 IOID_4
95#define Board_BTN2 PIN_UNASSIGNED
96
97/* Debug UART */
98#define Board_UART_RX IOID_2 /* RXD */
99#define Board_UART_TX IOID_3 /* TXD */
100
101/* DAC8730 UART */
102//#define Board_UART_TX IOID_8 /* TCD to DAC*/
103//#define Board_UART_RX IOID_9 /* RXD from DAC */
104
105/* SPI Board */
106#define Board_SPI0_IRQ IOID_10
107#define Board_SPI0_MISO IOID_12
108#define Board_SPI0_MOSI IOID_13
109#define Board_SPI0_CLK IOID_14
110#define Board_SPI0_CSN IOID_15
111
112#define Board_SPI1_MISO IOID_18
113#define Board_SPI1_MOSI IOID_19
114#define Board_SPI1_CLK IOID_20
115#define Board_SPI1_CSN IOID_21
116#define Board_SPI1_IRQ IOID_22
117
118/* Power */
119//#define Board_DIO0 IOID_0 // VCCIO_DAC
120//#define Board_DIO1 IOID_1 // GPS_PWR_nEN
121//#define Board_DIO7 IOID_7 // EH_nBYPASS
122//#define Board_DIO25 IOID_25 // SSM_PWR_nEN
123//#define Board_DIO26 IOID_26 // GPS_PWR_nEN
124//#define Board_DIO27 IOID_27 // VBAT_OK
125//#define Board_DIO28 IOID_28 // SSM_5V_EN
126
127/* Misc */
128//#define Board_DIO11 IOID_11 // BSL
129//#define Board_DIO16 IOID_16 // JTAG_TDO
130//#define Board_DIO17 IOID_17 // JTAG_TDI
131
132
133
134/* Analog */
135#define Board_DIO23_ANALOG PIN_UNASSIGNED
136#define Board_DIO24_ANALOG PIN_UNASSIGNED
137#define Board_DIO25_ANALOG PIN_UNASSIGNED
138#define Board_DIO26_ANALOG PIN_UNASSIGNED
139#define Board_DIO27_ANALOG PIN_UNASSIGNED
140#define Board_DIO28_ANALOG PIN_UNASSIGNED
141#define Board_DIO29_ANALOG PIN_UNASSIGNED
142#define Board_DIO30_ANALOG PIN_UNASSIGNED
143
144
145/* PWM outputs */
146#define Board_PWMPIN0 PIN_UNASSIGNED
147#define Board_PWMPIN1 PIN_UNASSIGNED
148#define Board_PWMPIN2 PIN_UNASSIGNED
149#define Board_PWMPIN3 PIN_UNASSIGNED
150#define Board_PWMPIN4 PIN_UNASSIGNED
151#define Board_PWMPIN5 PIN_UNASSIGNED
152#define Board_PWMPIN6 PIN_UNASSIGNED
153#define Board_PWMPIN7 PIN_UNASSIGNED
154
155
156/** ============================================================================
157 * Instance identifiers
158 * ==========================================================================*/
159/* Generic I2C instance identifiers */
160#define Board_I2C CC2650_I3MOTE_I2C0
161/* Generic SPI instance identifiers */
162#define Board_SPI0 CC2650_I3MOTE_SPI0
163#define Board_SPI1 CC2650_I3MOTE_SPI1
164/* Generic UART instance identifiers */
165#define Board_UART CC2650_I3MOTE_UART0
166/* Generic Crypto instance identifiers */
167#define Board_CRYPTO CC2650_I3MOTE_CRYPTO0
168/* Generic GPTimer instance identifiers */
169#define Board_GPTIMER0A CC2650_I3MOTE_GPTIMER0A
170#define Board_GPTIMER0B CC2650_I3MOTE_GPTIMER0B
171#define Board_GPTIMER1A CC2650_I3MOTE_GPTIMER1A
172#define Board_GPTIMER1B CC2650_I3MOTE_GPTIMER1B
173#define Board_GPTIMER2A CC2650_I3MOTE_GPTIMER2A
174#define Board_GPTIMER2B CC2650_I3MOTE_GPTIMER2B
175#define Board_GPTIMER3A CC2650_I3MOTE_GPTIMER3A
176#define Board_GPTIMER3B CC2650_I3MOTE_GPTIMER3B
177/* Generic PWM instance identifiers */
178#define Board_PWM0 CC2650_I3MOTE_PWM0
179#define Board_PWM1 CC2650_I3MOTE_PWM1
180#define Board_PWM2 CC2650_I3MOTE_PWM2
181#define Board_PWM3 CC2650_I3MOTE_PWM3
182#define Board_PWM4 CC2650_I3MOTE_PWM4
183#define Board_PWM5 CC2650_I3MOTE_PWM5
184#define Board_PWM6 CC2650_I3MOTE_PWM6
185#define Board_PWM7 CC2650_I3MOTE_PWM7
186
187/** ============================================================================
188 * Number of peripherals and their names
189 * ==========================================================================*/
190
191/*!
192 * @def CC2650_I3MOTE_I2CName
193 * @brief Enum of I2C names on the CC2650 dev board
194 */
195typedef enum CC2650_I3MOTE_I2CName {
196 CC2650_I3MOTE_I2C0 = 0,
197
198 CC2650_I3MOTE_I2CCOUNT
199} CC2650_I3MOTE_I2CName;
200
201/*!
202 * @def CC2650_I3MOTE_CryptoName
203 * @brief Enum of Crypto names on the CC2650 dev board
204 */
205typedef enum CC2650_I3MOTE_CryptoName {
206 CC2650_I3MOTE_CRYPTO0 = 0,
207
208 CC2650_I3MOTE_CRYPTOCOUNT
209} CC2650_I3MOTE_CryptoName;
210
211
212/*!
213 * @def CC2650_I3MOTE_SPIName
214 * @brief Enum of SPI names on the CC2650 dev board
215 */
216typedef enum CC2650_I3MOTE_SPIName {
217 CC2650_I3MOTE_SPI0 = 0,
218 CC2650_I3MOTE_SPI1,
219
220 CC2650_I3MOTE_SPICOUNT
221} CC2650_I3MOTE_SPIName;
222
223/*!
224 * @def CC2650_I3MOTE_UARTName
225 * @brief Enum of UARTs on the CC2650 dev board
226 */
227typedef enum CC2650_I3MOTE_UARTName {
228 CC2650_I3MOTE_UART0 = 0,
229
230 CC2650_I3MOTE_UARTCOUNT
231} CC2650_I3MOTE_UARTName;
232
233/*!
234 * @def CC2650_I3MOTE_UdmaName
235 * @brief Enum of DMA buffers
236 */
237typedef enum CC2650_I3MOTE_UdmaName {
238 CC2650_I3MOTE_UDMA0 = 0,
239
240 CC2650_I3MOTE_UDMACOUNT
241} CC2650_I3MOTE_UdmaName;
242
243/*!
244 * @def CC2650_I3MOTE_GPTimerName
245 * @brief Enum of GPTimer parts
246 */
247typedef enum CC2650_I3MOTE_GPTimerName
248{
249 CC2650_I3MOTE_GPTIMER0A = 0,
250 CC2650_I3MOTE_GPTIMER0B,
251 CC2650_I3MOTE_GPTIMER1A,
252 CC2650_I3MOTE_GPTIMER1B,
253 CC2650_I3MOTE_GPTIMER2A,
254 CC2650_I3MOTE_GPTIMER2B,
255 CC2650_I3MOTE_GPTIMER3A,
256 CC2650_I3MOTE_GPTIMER3B,
257 CC2650_I3MOTE_GPTIMERPARTSCOUNT
258} CC2650_I3MOTE_GPTimerName;
259
260/*!
261 * @def CC2650_I3MOTE_GPTimers
262 * @brief Enum of GPTimers
263 */
264typedef enum CC2650_I3MOTE_GPTimers
265{
266 CC2650_I3MOTE_GPTIMER0 = 0,
267 CC2650_I3MOTE_GPTIMER1,
268 CC2650_I3MOTE_GPTIMER2,
269 CC2650_I3MOTE_GPTIMER3,
270 CC2650_I3MOTE_GPTIMERCOUNT
271} CC2650_I3MOTE_GPTimers;
272
273/*!
274 * @def CC2650_I3MOTE_PWM
275 * @brief Enum of PWM outputs on the board
276 */
277typedef enum CC2650_I3MOTE_PWM
278{
279 CC2650_I3MOTE_PWM0 = 0,
280 CC2650_I3MOTE_PWM1,
281 CC2650_I3MOTE_PWM2,
282 CC2650_I3MOTE_PWM3,
283 CC2650_I3MOTE_PWM4,
284 CC2650_I3MOTE_PWM5,
285 CC2650_I3MOTE_PWM6,
286 CC2650_I3MOTE_PWM7,
287 CC2650_I3MOTE_PWMCOUNT
288} CC2650_I3MOTE_PWM;
289
290/*!
291 * @def CC2650_I3MOTE_ADCBufName
292 * @brief Enum of ADCs
293 */
294typedef enum CC2650_I3MOTE_ADCBufName {
295 CC2650_I3MOTE_ADCBuf0 = 0,
296 CC2650_I3MOTE_ADCBufCOUNT
297} CC2650_I3MOTE_ADCBufName;
298
299
300/*!
301 * @def CC2650_I3MOTE_ADCName
302 * @brief Enum of ADCs
303 */
304typedef enum CC2650_I3MOTE_ADCName {
305 CC2650_I3MOTE_ADC0 = 0,
306 CC2650_I3MOTE_ADC1,
307 CC2650_I3MOTE_ADC2,
308 CC2650_I3MOTE_ADC3,
309 CC2650_I3MOTE_ADC4,
310 CC2650_I3MOTE_ADC5,
311 CC2650_I3MOTE_ADC6,
312 CC2650_I3MOTE_ADC7,
313 CC2650_I3MOTE_ADCDCOUPL,
314 CC2650_I3MOTE_ADCVSS,
315 CC2650_I3MOTE_ADCVDDS,
316 CC2650_I3MOTE_ADCCOUNT
317} CC2650_I3MOTE_ADCName;
318
319
320#ifdef __cplusplus
321}
322#endif
323
324#endif /* __CC2650_I3MOTE_BOARD_H__ */
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/main.c b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/main.c
index 2cfa0ca..f96d641 100644
--- a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/main.c
+++ b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ/main.c
@@ -61,8 +61,8 @@ void buttonCallbackFxn(PIN_Handle handle, PIN_Id pinId) {
61 61
62 /* Wait IRQ from MSP432 line*/ 62 /* Wait IRQ from MSP432 line*/
63 PIN_setOutputValue(ledPinHandle, Board_LED1,1); 63 PIN_setOutputValue(ledPinHandle, Board_LED1,1);
64 Semaphore_post(semHandle);
65 CPUdelay(8000*100); 64 CPUdelay(8000*100);
65 Semaphore_post(semHandle);
66 PIN_setOutputValue(ledPinHandle, Board_LED1,0); 66 PIN_setOutputValue(ledPinHandle, Board_LED1,0);
67 67
68} 68}
@@ -89,7 +89,7 @@ Void echoFxn(UArg arg0, UArg arg1)
89 if(!spi){ 89 if(!spi){
90 System_printf("SPI did not open"); 90 System_printf("SPI did not open");
91 } 91 }
92 System_printf("SPI Init Done\r\n"); 92 System_printf("SPI-Master Open\r\n");
93 93
94 spiTransaction.rxBuf= rxBufferPointer; 94 spiTransaction.rxBuf= rxBufferPointer;
95 spiTransaction.txBuf = txBufferPointer; 95 spiTransaction.txBuf = txBufferPointer;
@@ -99,11 +99,13 @@ Void echoFxn(UArg arg0, UArg arg1)
99 99
100 Semaphore_pend(semHandle, BIOS_WAIT_FOREVER); 100 Semaphore_pend(semHandle, BIOS_WAIT_FOREVER);
101 101
102 txBufferPointer[0]=i++; 102 //txBufferPointer[0]=i++;
103 rxBufferPointer[0]=0; 103 //rxBufferPointer[0]=0;
104
105 txBufferPointer[0]=rxBufferPointer[0];
104 106
105 if (SPI_transfer(spi,&spiTransaction)) { 107 if (SPI_transfer(spi,&spiTransaction)) {
106 System_printf("TxData: %x RxData: %x\r\n",txBufferPointer[0],rxBufferPointer[0]); 108 System_printf("RxData: %x TxData: %x\r\n",rxBufferPointer[0],txBufferPointer[0]);
107 } 109 }
108 } 110 }
109 111
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_Blink/CC2650_I3M.c b/Basic-Test-Package/CC2650/Test_CC2650_Blink/CC2650_I3M.c
deleted file mode 100644
index f3e0087..0000000
--- a/Basic-Test-Package/CC2650/Test_CC2650_Blink/CC2650_I3M.c
+++ /dev/null
@@ -1,640 +0,0 @@
1/*
2 * Copyright (c) 2016, Texas Instruments Incorporated
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 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/*
34 * ====================== CC2650_I3MOTE.c ===================================
35 * This file is responsible for setting up the board specific items for the
36 * CC2650 LaunchPad.
37 */
38
39
40/*
41 * ====================== Includes ============================================
42 */
43#include <xdc/std.h>
44#include <xdc/runtime/System.h>
45
46#include <ti/sysbios/family/arm/m3/Hwi.h>
47#include <ti/drivers/PIN.h>
48#include <ti/drivers/pin/PINCC26XX.h>
49#include <ti/drivers/PWM.h>
50#include <ti/drivers/pwm/PWMTimerCC26XX.h>
51#include <ti/drivers/timer/GPTimerCC26XX.h>
52#include <ti/drivers/Power.h>
53#include <ti/drivers/power/PowerCC26XX.h>
54
55#include <inc/hw_memmap.h>
56#include <inc/hw_ints.h>
57#include <driverlib/ioc.h>
58#include <driverlib/udma.h>
59
60#include <Board.h>
61
62/*
63 * ========================= IO driver initialization =========================
64 * From main, PIN_init(BoardGpioInitTable) should be called to setup safe
65 * settings for this board.
66 * When a pin is allocated and then de-allocated, it will revert to the state
67 * configured in this table.
68 */
69/* Place into subsections to allow the TI linker to remove items properly */
70#if defined(__TI_COMPILER_VERSION__)
71#pragma DATA_SECTION(BoardGpioInitTable, ".const:BoardGpioInitTable")
72#pragma DATA_SECTION(PINCC26XX_hwAttrs, ".const:PINCC26XX_hwAttrs")
73#endif
74
75const PIN_Config BoardGpioInitTable[] = {
76
77 Board_LEDR | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
78 Board_LEDG | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
79 Board_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
80 Board_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, /* UART RX via debugger back channel */
81 Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* UART TX via debugger back channel */
82 PIN_TERMINATE
83};
84
85const PINCC26XX_HWAttrs PINCC26XX_hwAttrs = {
86 .intPriority = ~0,
87 .swiPriority = 0
88};
89/*============================================================================*/
90
91/*
92 * ============================= Power begin ==================================
93 */
94/* Place into subsections to allow the TI linker to remove items properly */
95#if defined(__TI_COMPILER_VERSION__)
96#pragma DATA_SECTION(PowerCC26XX_config, ".const:PowerCC26XX_config")
97#endif
98const PowerCC26XX_Config PowerCC26XX_config = {
99 .policyInitFxn = NULL,
100 .policyFxn = &PowerCC26XX_standbyPolicy,
101 .calibrateFxn = &PowerCC26XX_calibrate,
102 .enablePolicy = TRUE,
103 .calibrateRCOSC_LF = TRUE,
104 .calibrateRCOSC_HF = TRUE,
105};
106/*
107 * ============================= Power end ====================================
108 */
109
110/*
111 * ============================= UART begin ===================================
112 */
113/* Place into subsections to allow the TI linker to remove items properly */
114#if defined(__TI_COMPILER_VERSION__)
115#pragma DATA_SECTION(UART_config, ".const:UART_config")
116#pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
117#endif
118
119/* Include drivers */
120#include <ti/drivers/UART.h>
121#include <ti/drivers/uart/UARTCC26XX.h>
122
123/* UART objects */
124UARTCC26XX_Object uartCC26XXObjects[CC2650_I3MOTE_UARTCOUNT];
125
126/* UART hardware parameter structure, also used to assign UART pins */
127const UARTCC26XX_HWAttrsV1 uartCC26XXHWAttrs[CC2650_I3MOTE_UARTCOUNT] = {
128 {
129 .baseAddr = UART0_BASE,
130 .powerMngrId = PowerCC26XX_PERIPH_UART0,
131 .intNum = INT_UART0_COMB,
132 .intPriority = ~0,
133 .swiPriority = 0,
134 .txPin = Board_UART_TX,
135 .rxPin = Board_UART_RX,
136 .ctsPin = PIN_UNASSIGNED,
137 .rtsPin = PIN_UNASSIGNED
138 }
139};
140
141/* UART configuration structure */
142const UART_Config UART_config[] = {
143 {
144 .fxnTablePtr = &UARTCC26XX_fxnTable,
145 .object = &uartCC26XXObjects[0],
146 .hwAttrs = &uartCC26XXHWAttrs[0]
147 },
148 {NULL, NULL, NULL}
149};
150/*
151 * ============================= UART end =====================================
152 */
153
154/*
155 * ============================= UDMA begin ===================================
156 */
157/* Place into subsections to allow the TI linker to remove items properly */
158#if defined(__TI_COMPILER_VERSION__)
159#pragma DATA_SECTION(UDMACC26XX_config, ".const:UDMACC26XX_config")
160#pragma DATA_SECTION(udmaHWAttrs, ".const:udmaHWAttrs")
161#endif
162
163/* Include drivers */
164#include <ti/drivers/dma/UDMACC26XX.h>
165
166/* UDMA objects */
167UDMACC26XX_Object udmaObjects[CC2650_I3MOTE_UDMACOUNT];
168
169/* UDMA configuration structure */
170const UDMACC26XX_HWAttrs udmaHWAttrs[CC2650_I3MOTE_UDMACOUNT] = {
171 {
172 .baseAddr = UDMA0_BASE,
173 .powerMngrId = PowerCC26XX_PERIPH_UDMA,
174 .intNum = INT_DMA_ERR,
175 .intPriority = ~0
176 }
177};
178
179/* UDMA configuration structure */
180const UDMACC26XX_Config UDMACC26XX_config[] = {
181 {
182 .object = &udmaObjects[0],
183 .hwAttrs = &udmaHWAttrs[0]
184 },
185 {NULL, NULL}
186};
187/*
188 * ============================= UDMA end =====================================
189 */
190
191/*
192 * ========================== SPI DMA begin ===================================
193 */
194/* Place into subsections to allow the TI linker to remove items properly */
195#if defined(__TI_COMPILER_VERSION__)
196#pragma DATA_SECTION(SPI_config, ".const:SPI_config")
197#pragma DATA_SECTION(spiCC26XXDMAHWAttrs, ".const:spiCC26XXDMAHWAttrs")
198#endif
199
200/* Include drivers */
201#include <ti/drivers/spi/SPICC26XXDMA.h>
202
203/* SPI objects */
204SPICC26XXDMA_Object spiCC26XXDMAObjects[CC2650_I3MOTE_SPICOUNT];
205
206/* SPI configuration structure, describing which pins are to be used */
207const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2650_I3MOTE_SPICOUNT] = {
208 {
209 .baseAddr = SSI0_BASE,
210 .intNum = INT_SSI0_COMB,
211 .intPriority = ~0,
212 .swiPriority = 0,
213 .powerMngrId = PowerCC26XX_PERIPH_SSI0,
214 .defaultTxBufValue = 0,
215 .rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
216 .txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
217 .mosiPin = Board_SPI0_MOSI,
218 .misoPin = Board_SPI0_MISO,
219 .clkPin = Board_SPI0_CLK,
220 .csnPin = Board_SPI0_CSN
221 },
222 {
223 .baseAddr = SSI1_BASE,
224 .intNum = INT_SSI1_COMB,
225 .intPriority = ~0,
226 .swiPriority = 0,
227 .powerMngrId = PowerCC26XX_PERIPH_SSI1,
228 .defaultTxBufValue = 0,
229 .rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
230 .txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
231 .mosiPin = Board_SPI1_MOSI,
232 .misoPin = Board_SPI1_MISO,
233 .clkPin = Board_SPI1_CLK,
234 .csnPin = Board_SPI1_CSN
235 }
236};
237
238/* SPI configuration structure */
239const SPI_Config SPI_config[] = {
240 {
241 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
242 .object = &spiCC26XXDMAObjects[0],
243 .hwAttrs = &spiCC26XXDMAHWAttrs[0]
244 },
245 {
246 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
247 .object = &spiCC26XXDMAObjects[1],
248 .hwAttrs = &spiCC26XXDMAHWAttrs[1]
249 },
250 {NULL, NULL, NULL}
251};
252/*
253 * ========================== SPI DMA end =====================================
254*/
255
256
257/*
258 * ============================= I2C Begin=====================================
259*/
260/* Place into subsections to allow the TI linker to remove items properly */
261#if defined(__TI_COMPILER_VERSION__)
262#pragma DATA_SECTION(I2C_config, ".const:I2C_config")
263#pragma DATA_SECTION(i2cCC26xxHWAttrs, ".const:i2cCC26xxHWAttrs")
264#endif
265
266/* Include drivers */
267#include <ti/drivers/i2c/I2CCC26XX.h>
268
269/* I2C objects */
270I2CCC26XX_Object i2cCC26xxObjects[CC2650_I3MOTE_I2CCOUNT];
271
272/* I2C configuration structure, describing which pins are to be used */
273const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_I3MOTE_I2CCOUNT] = {
274 {
275 .baseAddr = I2C0_BASE,
276 .powerMngrId = PowerCC26XX_PERIPH_I2C0,
277 .intNum = INT_I2C_IRQ,
278 .intPriority = ~0,
279 .swiPriority = 0,
280 .sdaPin = Board_I2C0_SDA0,
281 .sclPin = Board_I2C0_SCL0,
282 }
283};
284
285/* I2C configuration structure */
286const I2C_Config I2C_config[] = {
287 {
288 .fxnTablePtr = &I2CCC26XX_fxnTable,
289 .object = &i2cCC26xxObjects[0],
290 .hwAttrs = &i2cCC26xxHWAttrs[0]
291 },
292 {NULL, NULL, NULL}
293};
294/*
295 * ========================== I2C end =========================================
296 */
297
298/*
299 * ========================== Crypto begin ====================================
300 * NOTE: The Crypto implementation should be considered experimental
301 * and not validated!
302 */
303/* Place into subsections to allow the TI linker to remove items properly */
304#if defined(__TI_COMPILER_VERSION__)
305#pragma DATA_SECTION(CryptoCC26XX_config, ".const:CryptoCC26XX_config")
306#pragma DATA_SECTION(cryptoCC26XXHWAttrs, ".const:cryptoCC26XXHWAttrs")
307#endif
308
309/* Include drivers */
310#include <ti/drivers/crypto/CryptoCC26XX.h>
311
312/* Crypto objects */
313CryptoCC26XX_Object cryptoCC26XXObjects[CC2650_I3MOTE_CRYPTOCOUNT];
314
315/* Crypto configuration structure, describing which pins are to be used */
316const CryptoCC26XX_HWAttrs cryptoCC26XXHWAttrs[CC2650_I3MOTE_CRYPTOCOUNT] = {
317 {
318 .baseAddr = CRYPTO_BASE,
319 .powerMngrId = PowerCC26XX_PERIPH_CRYPTO,
320 .intNum = INT_CRYPTO_RESULT_AVAIL_IRQ,
321 .intPriority = ~0,
322 }
323};
324
325/* Crypto configuration structure */
326const CryptoCC26XX_Config CryptoCC26XX_config[] = {
327 {
328 .object = &cryptoCC26XXObjects[0],
329 .hwAttrs = &cryptoCC26XXHWAttrs[0]
330 },
331 {NULL, NULL}
332};
333/*
334 * ========================== Crypto end ======================================
335 */
336
337
338/*
339 * ========================= RF driver begin ==================================
340 */
341/* Place into subsections to allow the TI linker to remove items properly */
342#if defined(__TI_COMPILER_VERSION__)
343#pragma DATA_SECTION(RFCC26XX_hwAttrs, ".const:RFCC26XX_hwAttrs")
344#endif
345
346/* Include drivers */
347#include <ti/drivers/rf/RF.h>
348
349/* RF hwi and swi priority */
350const RFCC26XX_HWAttrs RFCC26XX_hwAttrs = {
351 .hwiCpe0Priority = ~0,
352 .hwiHwPriority = ~0,
353 .swiCpe0Priority = 0,
354 .swiHwPriority = 0,
355};
356
357/*
358 * ========================== RF driver end ===================================
359 */
360
361/*
362 * ========================= Display begin ====================================
363 */
364
365/*
366 * ========================= Display end ======================================
367 */
368
369/*
370 * ============================ GPTimer begin =================================
371 * Remove unused entries to reduce flash usage both in Board.c and Board.h
372 */
373/* Place into subsections to allow the TI linker to remove items properly */
374#if defined(__TI_COMPILER_VERSION__)
375#pragma DATA_SECTION(GPTimerCC26XX_config, ".const:GPTimerCC26XX_config")
376#pragma DATA_SECTION(gptimerCC26xxHWAttrs, ".const:gptimerCC26xxHWAttrs")
377#endif
378
379/* GPTimer hardware attributes, one per timer part (Timer 0A, 0B, 1A, 1B..) */
380const GPTimerCC26XX_HWAttrs gptimerCC26xxHWAttrs[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
381 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0A, },
382 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0B, },
383 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1A, },
384 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1B, },
385 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2A, },
386 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2B, },
387 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3A, },
388 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3B, },
389};
390
391/* GPTimer objects, one per full-width timer (A+B) (Timer 0, Timer 1..) */
392GPTimerCC26XX_Object gptimerCC26XXObjects[CC2650_I3MOTE_GPTIMERCOUNT];
393
394/* GPTimer configuration (used as GPTimer_Handle by driver and application) */
395const GPTimerCC26XX_Config GPTimerCC26XX_config[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
396 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[0], GPT_A },
397 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[1], GPT_B },
398 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[2], GPT_A },
399 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[3], GPT_B },
400 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[4], GPT_A },
401 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[5], GPT_B },
402 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[6], GPT_A },
403 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[7], GPT_B },
404};
405
406/*
407 * ============================ GPTimer end ===================================
408 */
409
410
411
412/*
413 * ============================= PWM begin ====================================
414 * Remove unused entries to reduce flash usage both in Board.c and Board.h
415 */
416/* Place into subsections to allow the TI linker to remove items properly */
417#if defined(__TI_COMPILER_VERSION__)
418#pragma DATA_SECTION(PWM_config, ".const:PWM_config")
419#pragma DATA_SECTION(pwmtimerCC26xxHWAttrs, ".const:pwmtimerCC26xxHWAttrs")
420#endif
421
422/* PWM configuration, one per PWM output. */
423PWMTimerCC26XX_HwAttrs pwmtimerCC26xxHWAttrs[CC2650_I3MOTE_PWMCOUNT] = {
424 { .pwmPin = Board_PWMPIN0, .gpTimerUnit = Board_GPTIMER0A },
425 { .pwmPin = Board_PWMPIN1, .gpTimerUnit = Board_GPTIMER0B },
426 { .pwmPin = Board_PWMPIN2, .gpTimerUnit = Board_GPTIMER1A },
427 { .pwmPin = Board_PWMPIN3, .gpTimerUnit = Board_GPTIMER1B },
428 { .pwmPin = Board_PWMPIN4, .gpTimerUnit = Board_GPTIMER2A },
429 { .pwmPin = Board_PWMPIN5, .gpTimerUnit = Board_GPTIMER2B },
430 { .pwmPin = Board_PWMPIN6, .gpTimerUnit = Board_GPTIMER3A },
431 { .pwmPin = Board_PWMPIN7, .gpTimerUnit = Board_GPTIMER3B },
432};
433
434/* PWM object, one per PWM output */
435PWMTimerCC26XX_Object pwmtimerCC26xxObjects[CC2650_I3MOTE_PWMCOUNT];
436
437extern const PWM_FxnTable PWMTimerCC26XX_fxnTable;
438
439/* PWM configuration (used as PWM_Handle by driver and application) */
440const PWM_Config PWM_config[CC2650_I3MOTE_PWMCOUNT + 1] = {
441 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[0], &pwmtimerCC26xxHWAttrs[0] },
442 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[1], &pwmtimerCC26xxHWAttrs[1] },
443 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[2], &pwmtimerCC26xxHWAttrs[2] },
444 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[3], &pwmtimerCC26xxHWAttrs[3] },
445 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[4], &pwmtimerCC26xxHWAttrs[4] },
446 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[5], &pwmtimerCC26xxHWAttrs[5] },
447 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[6], &pwmtimerCC26xxHWAttrs[6] },
448 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[7], &pwmtimerCC26xxHWAttrs[7] },
449 { NULL, NULL, NULL }
450};
451
452
453/*
454 * ============================= PWM end ======================================
455 */
456
457/*
458 * ========================== ADCBuf begin =========================================
459 */
460/* Place into subsections to allow the TI linker to remove items properly */
461#if defined(__TI_COMPILER_VERSION__)
462#pragma DATA_SECTION(ADCBuf_config, ".const:ADCBuf_config")
463#pragma DATA_SECTION(adcBufCC26xxHWAttrs, ".const:adcBufCC26xxHWAttrs")
464#pragma DATA_SECTION(ADCBufCC26XX_adcChannelLut, ".const:ADCBufCC26XX_adcChannelLut")
465#endif
466
467/* Include drivers */
468#include <ti/drivers/ADCBuf.h>
469#include <ti/drivers/adcbuf/ADCBufCC26XX.h>
470
471/* ADCBuf objects */
472ADCBufCC26XX_Object adcBufCC26xxObjects[CC2650_I3MOTE_ADCBufCOUNT];
473
474/*
475 * This table converts a virtual adc channel into a dio and internal analogue input signal.
476 * This table is necessary for the functioning of the adcBuf driver.
477 * Comment out unused entries to save flash.
478 * Dio and internal signal pairs are hardwired. Do not remap them in the table. You may reorder entire entries though.
479 * The mapping of dio and internal signals is package dependent.
480 */
481const ADCBufCC26XX_AdcChannelLutEntry ADCBufCC26XX_adcChannelLut[] = {
482 {PIN_UNASSIGNED, ADC_COMPB_IN_VDDS},
483 {PIN_UNASSIGNED, ADC_COMPB_IN_DCOUPL},
484 {PIN_UNASSIGNED, ADC_COMPB_IN_VSS},
485 //{Board_DIO23_ANALOG, ADC_COMPB_IN_AUXIO7},
486 //{Board_DIO24_ANALOG, ADC_COMPB_IN_AUXIO6},
487 //{Board_DIO25_ANALOG, ADC_COMPB_IN_AUXIO5},
488 //{Board_DIO26_ANALOG, ADC_COMPB_IN_AUXIO4},
489 //{Board_DIO27_ANALOG, ADC_COMPB_IN_AUXIO3},
490 //{Board_DIO28_ANALOG, ADC_COMPB_IN_AUXIO2},
491 //{Board_DIO29_ANALOG, ADC_COMPB_IN_AUXIO1},
492 //{Board_DIO30_ANALOG, ADC_COMPB_IN_AUXIO0},
493};
494
495const ADCBufCC26XX_HWAttrs adcBufCC26xxHWAttrs[CC2650_I3MOTE_ADCBufCOUNT] = {
496 {
497 .intPriority = ~0,
498 .swiPriority = 0,
499 .adcChannelLut = ADCBufCC26XX_adcChannelLut,
500 .gpTimerUnit = Board_GPTIMER0A,
501 .gptDMAChannelMask = 1 << UDMA_CHAN_TIMER0_A,
502 }
503};
504
505const ADCBuf_Config ADCBuf_config[] = {
506 {&ADCBufCC26XX_fxnTable, &adcBufCC26xxObjects[0], &adcBufCC26xxHWAttrs[0]},
507 {NULL, NULL, NULL},
508};
509/*
510 * ========================== ADCBuf end =========================================
511 */
512
513
514
515/*
516 * ========================== ADC begin =========================================
517 */
518/* Place into subsections to allow the TI linker to remove items properly */
519#if defined(__TI_COMPILER_VERSION__)
520#pragma DATA_SECTION(ADC_config, ".const:ADC_config")
521#pragma DATA_SECTION(adcCC26xxHWAttrs, ".const:adcCC26xxHWAttrs")
522#endif
523
524/* Include drivers */
525#include <ti/drivers/ADC.h>
526#include <ti/drivers/adc/ADCCC26XX.h>
527
528/* ADC objects */
529ADCCC26XX_Object adcCC26xxObjects[CC2650_I3MOTE_ADCCOUNT];
530
531
532const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC2650_I3MOTE_ADCCOUNT] = {
533 {
534 .adcDIO = Board_DIO23_ANALOG,
535 .adcCompBInput = ADC_COMPB_IN_AUXIO7,
536 .refSource = ADCCC26XX_FIXED_REFERENCE,
537 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
538 .inputScalingEnabled = true,
539 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
540 },
541 {
542 .adcDIO = Board_DIO24_ANALOG,
543 .adcCompBInput = ADC_COMPB_IN_AUXIO6,
544 .refSource = ADCCC26XX_FIXED_REFERENCE,
545 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
546 .inputScalingEnabled = true,
547 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
548 },
549 {
550 .adcDIO = Board_DIO25_ANALOG,
551 .adcCompBInput = ADC_COMPB_IN_AUXIO5,
552 .refSource = ADCCC26XX_FIXED_REFERENCE,
553 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
554 .inputScalingEnabled = true,
555 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
556 },
557 {
558 .adcDIO = Board_DIO26_ANALOG,
559 .adcCompBInput = ADC_COMPB_IN_AUXIO4,
560 .refSource = ADCCC26XX_FIXED_REFERENCE,
561 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
562 .inputScalingEnabled = true,
563 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
564 },
565 {
566 .adcDIO = Board_DIO27_ANALOG,
567 .adcCompBInput = ADC_COMPB_IN_AUXIO3,
568 .refSource = ADCCC26XX_FIXED_REFERENCE,
569 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
570 .inputScalingEnabled = true,
571 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
572 },
573 {
574 .adcDIO = Board_DIO28_ANALOG,
575 .adcCompBInput = ADC_COMPB_IN_AUXIO2,
576 .refSource = ADCCC26XX_FIXED_REFERENCE,
577 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
578 .inputScalingEnabled = true,
579 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
580 },
581 {
582 .adcDIO = Board_DIO29_ANALOG,
583 .adcCompBInput = ADC_COMPB_IN_AUXIO1,
584 .refSource = ADCCC26XX_FIXED_REFERENCE,
585 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
586 .inputScalingEnabled = true,
587 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
588 },
589 {
590 .adcDIO = Board_DIO30_ANALOG,
591 .adcCompBInput = ADC_COMPB_IN_AUXIO0,
592 .refSource = ADCCC26XX_FIXED_REFERENCE,
593 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_10P9_MS,
594 .inputScalingEnabled = true,
595 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
596 },
597 {
598 .adcDIO = PIN_UNASSIGNED,
599 .adcCompBInput = ADC_COMPB_IN_DCOUPL,
600 .refSource = ADCCC26XX_FIXED_REFERENCE,
601 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
602 .inputScalingEnabled = true,
603 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
604 },
605 {
606 .adcDIO = PIN_UNASSIGNED,
607 .adcCompBInput = ADC_COMPB_IN_VSS,
608 .refSource = ADCCC26XX_FIXED_REFERENCE,
609 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
610 .inputScalingEnabled = true,
611 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
612 },
613 {
614 .adcDIO = PIN_UNASSIGNED,
615 .adcCompBInput = ADC_COMPB_IN_VDDS,
616 .refSource = ADCCC26XX_FIXED_REFERENCE,
617 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
618 .inputScalingEnabled = true,
619 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
620 }
621};
622
623const ADC_Config ADC_config[] = {
624 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[0], &adcCC26xxHWAttrs[0]},
625 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[1], &adcCC26xxHWAttrs[1]},
626 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[2], &adcCC26xxHWAttrs[2]},
627 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[3], &adcCC26xxHWAttrs[3]},
628 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[4], &adcCC26xxHWAttrs[4]},
629 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[5], &adcCC26xxHWAttrs[5]},
630 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[6], &adcCC26xxHWAttrs[6]},
631 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[7], &adcCC26xxHWAttrs[7]},
632 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[8], &adcCC26xxHWAttrs[8]},
633 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[9], &adcCC26xxHWAttrs[9]},
634 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[10], &adcCC26xxHWAttrs[10]},
635 {NULL, NULL, NULL},
636};
637
638/*
639 * ========================== ADC end =========================================
640 */
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_Blink/main.c b/Basic-Test-Package/CC2650/Test_CC2650_Blink/main.c
index a6c6bfe..00045f3 100644
--- a/Basic-Test-Package/CC2650/Test_CC2650_Blink/main.c
+++ b/Basic-Test-Package/CC2650/Test_CC2650_Blink/main.c
@@ -103,7 +103,7 @@ int main(void)
103 103
104 /* Construct heartBeat Task thread */ 104 /* Construct heartBeat Task thread */
105 Task_Params_init(&taskParams); 105 Task_Params_init(&taskParams);
106 taskParams.arg0 = 500000 / Clock_tickPeriod; 106 taskParams.arg0 = 250000 / Clock_tickPeriod;
107 taskParams.stackSize = TASKSTACKSIZE; 107 taskParams.stackSize = TASKSTACKSIZE;
108 taskParams.stack = &task0Stack; 108 taskParams.stack = &task0Stack;
109 Task_construct(&task0Struct, (Task_FuncPtr)heartBeatFxn, &taskParams, NULL); 109 Task_construct(&task0Struct, (Task_FuncPtr)heartBeatFxn, &taskParams, NULL);
@@ -114,7 +114,7 @@ int main(void)
114 System_abort("Error initializing board LED pins\n"); 114 System_abort("Error initializing board LED pins\n");
115 } 115 }
116 116
117 PIN_setOutputValue(ledPinHandle, Board_LED1, 0); 117 PIN_setOutputValue(ledPinHandle, Board_LED1, 1);
118 PIN_setOutputValue(ledPinHandle, Board_LED0, 0); 118 PIN_setOutputValue(ledPinHandle, Board_LED0, 0);
119 119
120 /* Start BIOS */ 120 /* Start BIOS */
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/CC2650_I3M.c b/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/CC2650_I3M.c
deleted file mode 100644
index f3e0087..0000000
--- a/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/CC2650_I3M.c
+++ /dev/null
@@ -1,640 +0,0 @@
1/*
2 * Copyright (c) 2016, Texas Instruments Incorporated
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 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/*
34 * ====================== CC2650_I3MOTE.c ===================================
35 * This file is responsible for setting up the board specific items for the
36 * CC2650 LaunchPad.
37 */
38
39
40/*
41 * ====================== Includes ============================================
42 */
43#include <xdc/std.h>
44#include <xdc/runtime/System.h>
45
46#include <ti/sysbios/family/arm/m3/Hwi.h>
47#include <ti/drivers/PIN.h>
48#include <ti/drivers/pin/PINCC26XX.h>
49#include <ti/drivers/PWM.h>
50#include <ti/drivers/pwm/PWMTimerCC26XX.h>
51#include <ti/drivers/timer/GPTimerCC26XX.h>
52#include <ti/drivers/Power.h>
53#include <ti/drivers/power/PowerCC26XX.h>
54
55#include <inc/hw_memmap.h>
56#include <inc/hw_ints.h>
57#include <driverlib/ioc.h>
58#include <driverlib/udma.h>
59
60#include <Board.h>
61
62/*
63 * ========================= IO driver initialization =========================
64 * From main, PIN_init(BoardGpioInitTable) should be called to setup safe
65 * settings for this board.
66 * When a pin is allocated and then de-allocated, it will revert to the state
67 * configured in this table.
68 */
69/* Place into subsections to allow the TI linker to remove items properly */
70#if defined(__TI_COMPILER_VERSION__)
71#pragma DATA_SECTION(BoardGpioInitTable, ".const:BoardGpioInitTable")
72#pragma DATA_SECTION(PINCC26XX_hwAttrs, ".const:PINCC26XX_hwAttrs")
73#endif
74
75const PIN_Config BoardGpioInitTable[] = {
76
77 Board_LEDR | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
78 Board_LEDG | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
79 Board_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
80 Board_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, /* UART RX via debugger back channel */
81 Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* UART TX via debugger back channel */
82 PIN_TERMINATE
83};
84
85const PINCC26XX_HWAttrs PINCC26XX_hwAttrs = {
86 .intPriority = ~0,
87 .swiPriority = 0
88};
89/*============================================================================*/
90
91/*
92 * ============================= Power begin ==================================
93 */
94/* Place into subsections to allow the TI linker to remove items properly */
95#if defined(__TI_COMPILER_VERSION__)
96#pragma DATA_SECTION(PowerCC26XX_config, ".const:PowerCC26XX_config")
97#endif
98const PowerCC26XX_Config PowerCC26XX_config = {
99 .policyInitFxn = NULL,
100 .policyFxn = &PowerCC26XX_standbyPolicy,
101 .calibrateFxn = &PowerCC26XX_calibrate,
102 .enablePolicy = TRUE,
103 .calibrateRCOSC_LF = TRUE,
104 .calibrateRCOSC_HF = TRUE,
105};
106/*
107 * ============================= Power end ====================================
108 */
109
110/*
111 * ============================= UART begin ===================================
112 */
113/* Place into subsections to allow the TI linker to remove items properly */
114#if defined(__TI_COMPILER_VERSION__)
115#pragma DATA_SECTION(UART_config, ".const:UART_config")
116#pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
117#endif
118
119/* Include drivers */
120#include <ti/drivers/UART.h>
121#include <ti/drivers/uart/UARTCC26XX.h>
122
123/* UART objects */
124UARTCC26XX_Object uartCC26XXObjects[CC2650_I3MOTE_UARTCOUNT];
125
126/* UART hardware parameter structure, also used to assign UART pins */
127const UARTCC26XX_HWAttrsV1 uartCC26XXHWAttrs[CC2650_I3MOTE_UARTCOUNT] = {
128 {
129 .baseAddr = UART0_BASE,
130 .powerMngrId = PowerCC26XX_PERIPH_UART0,
131 .intNum = INT_UART0_COMB,
132 .intPriority = ~0,
133 .swiPriority = 0,
134 .txPin = Board_UART_TX,
135 .rxPin = Board_UART_RX,
136 .ctsPin = PIN_UNASSIGNED,
137 .rtsPin = PIN_UNASSIGNED
138 }
139};
140
141/* UART configuration structure */
142const UART_Config UART_config[] = {
143 {
144 .fxnTablePtr = &UARTCC26XX_fxnTable,
145 .object = &uartCC26XXObjects[0],
146 .hwAttrs = &uartCC26XXHWAttrs[0]
147 },
148 {NULL, NULL, NULL}
149};
150/*
151 * ============================= UART end =====================================
152 */
153
154/*
155 * ============================= UDMA begin ===================================
156 */
157/* Place into subsections to allow the TI linker to remove items properly */
158#if defined(__TI_COMPILER_VERSION__)
159#pragma DATA_SECTION(UDMACC26XX_config, ".const:UDMACC26XX_config")
160#pragma DATA_SECTION(udmaHWAttrs, ".const:udmaHWAttrs")
161#endif
162
163/* Include drivers */
164#include <ti/drivers/dma/UDMACC26XX.h>
165
166/* UDMA objects */
167UDMACC26XX_Object udmaObjects[CC2650_I3MOTE_UDMACOUNT];
168
169/* UDMA configuration structure */
170const UDMACC26XX_HWAttrs udmaHWAttrs[CC2650_I3MOTE_UDMACOUNT] = {
171 {
172 .baseAddr = UDMA0_BASE,
173 .powerMngrId = PowerCC26XX_PERIPH_UDMA,
174 .intNum = INT_DMA_ERR,
175 .intPriority = ~0
176 }
177};
178
179/* UDMA configuration structure */
180const UDMACC26XX_Config UDMACC26XX_config[] = {
181 {
182 .object = &udmaObjects[0],
183 .hwAttrs = &udmaHWAttrs[0]
184 },
185 {NULL, NULL}
186};
187/*
188 * ============================= UDMA end =====================================
189 */
190
191/*
192 * ========================== SPI DMA begin ===================================
193 */
194/* Place into subsections to allow the TI linker to remove items properly */
195#if defined(__TI_COMPILER_VERSION__)
196#pragma DATA_SECTION(SPI_config, ".const:SPI_config")
197#pragma DATA_SECTION(spiCC26XXDMAHWAttrs, ".const:spiCC26XXDMAHWAttrs")
198#endif
199
200/* Include drivers */
201#include <ti/drivers/spi/SPICC26XXDMA.h>
202
203/* SPI objects */
204SPICC26XXDMA_Object spiCC26XXDMAObjects[CC2650_I3MOTE_SPICOUNT];
205
206/* SPI configuration structure, describing which pins are to be used */
207const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2650_I3MOTE_SPICOUNT] = {
208 {
209 .baseAddr = SSI0_BASE,
210 .intNum = INT_SSI0_COMB,
211 .intPriority = ~0,
212 .swiPriority = 0,
213 .powerMngrId = PowerCC26XX_PERIPH_SSI0,
214 .defaultTxBufValue = 0,
215 .rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
216 .txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
217 .mosiPin = Board_SPI0_MOSI,
218 .misoPin = Board_SPI0_MISO,
219 .clkPin = Board_SPI0_CLK,
220 .csnPin = Board_SPI0_CSN
221 },
222 {
223 .baseAddr = SSI1_BASE,
224 .intNum = INT_SSI1_COMB,
225 .intPriority = ~0,
226 .swiPriority = 0,
227 .powerMngrId = PowerCC26XX_PERIPH_SSI1,
228 .defaultTxBufValue = 0,
229 .rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
230 .txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
231 .mosiPin = Board_SPI1_MOSI,
232 .misoPin = Board_SPI1_MISO,
233 .clkPin = Board_SPI1_CLK,
234 .csnPin = Board_SPI1_CSN
235 }
236};
237
238/* SPI configuration structure */
239const SPI_Config SPI_config[] = {
240 {
241 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
242 .object = &spiCC26XXDMAObjects[0],
243 .hwAttrs = &spiCC26XXDMAHWAttrs[0]
244 },
245 {
246 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
247 .object = &spiCC26XXDMAObjects[1],
248 .hwAttrs = &spiCC26XXDMAHWAttrs[1]
249 },
250 {NULL, NULL, NULL}
251};
252/*
253 * ========================== SPI DMA end =====================================
254*/
255
256
257/*
258 * ============================= I2C Begin=====================================
259*/
260/* Place into subsections to allow the TI linker to remove items properly */
261#if defined(__TI_COMPILER_VERSION__)
262#pragma DATA_SECTION(I2C_config, ".const:I2C_config")
263#pragma DATA_SECTION(i2cCC26xxHWAttrs, ".const:i2cCC26xxHWAttrs")
264#endif
265
266/* Include drivers */
267#include <ti/drivers/i2c/I2CCC26XX.h>
268
269/* I2C objects */
270I2CCC26XX_Object i2cCC26xxObjects[CC2650_I3MOTE_I2CCOUNT];
271
272/* I2C configuration structure, describing which pins are to be used */
273const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_I3MOTE_I2CCOUNT] = {
274 {
275 .baseAddr = I2C0_BASE,
276 .powerMngrId = PowerCC26XX_PERIPH_I2C0,
277 .intNum = INT_I2C_IRQ,
278 .intPriority = ~0,
279 .swiPriority = 0,
280 .sdaPin = Board_I2C0_SDA0,
281 .sclPin = Board_I2C0_SCL0,
282 }
283};
284
285/* I2C configuration structure */
286const I2C_Config I2C_config[] = {
287 {
288 .fxnTablePtr = &I2CCC26XX_fxnTable,
289 .object = &i2cCC26xxObjects[0],
290 .hwAttrs = &i2cCC26xxHWAttrs[0]
291 },
292 {NULL, NULL, NULL}
293};
294/*
295 * ========================== I2C end =========================================
296 */
297
298/*
299 * ========================== Crypto begin ====================================
300 * NOTE: The Crypto implementation should be considered experimental
301 * and not validated!
302 */
303/* Place into subsections to allow the TI linker to remove items properly */
304#if defined(__TI_COMPILER_VERSION__)
305#pragma DATA_SECTION(CryptoCC26XX_config, ".const:CryptoCC26XX_config")
306#pragma DATA_SECTION(cryptoCC26XXHWAttrs, ".const:cryptoCC26XXHWAttrs")
307#endif
308
309/* Include drivers */
310#include <ti/drivers/crypto/CryptoCC26XX.h>
311
312/* Crypto objects */
313CryptoCC26XX_Object cryptoCC26XXObjects[CC2650_I3MOTE_CRYPTOCOUNT];
314
315/* Crypto configuration structure, describing which pins are to be used */
316const CryptoCC26XX_HWAttrs cryptoCC26XXHWAttrs[CC2650_I3MOTE_CRYPTOCOUNT] = {
317 {
318 .baseAddr = CRYPTO_BASE,
319 .powerMngrId = PowerCC26XX_PERIPH_CRYPTO,
320 .intNum = INT_CRYPTO_RESULT_AVAIL_IRQ,
321 .intPriority = ~0,
322 }
323};
324
325/* Crypto configuration structure */
326const CryptoCC26XX_Config CryptoCC26XX_config[] = {
327 {
328 .object = &cryptoCC26XXObjects[0],
329 .hwAttrs = &cryptoCC26XXHWAttrs[0]
330 },
331 {NULL, NULL}
332};
333/*
334 * ========================== Crypto end ======================================
335 */
336
337
338/*
339 * ========================= RF driver begin ==================================
340 */
341/* Place into subsections to allow the TI linker to remove items properly */
342#if defined(__TI_COMPILER_VERSION__)
343#pragma DATA_SECTION(RFCC26XX_hwAttrs, ".const:RFCC26XX_hwAttrs")
344#endif
345
346/* Include drivers */
347#include <ti/drivers/rf/RF.h>
348
349/* RF hwi and swi priority */
350const RFCC26XX_HWAttrs RFCC26XX_hwAttrs = {
351 .hwiCpe0Priority = ~0,
352 .hwiHwPriority = ~0,
353 .swiCpe0Priority = 0,
354 .swiHwPriority = 0,
355};
356
357/*
358 * ========================== RF driver end ===================================
359 */
360
361/*
362 * ========================= Display begin ====================================
363 */
364
365/*
366 * ========================= Display end ======================================
367 */
368
369/*
370 * ============================ GPTimer begin =================================
371 * Remove unused entries to reduce flash usage both in Board.c and Board.h
372 */
373/* Place into subsections to allow the TI linker to remove items properly */
374#if defined(__TI_COMPILER_VERSION__)
375#pragma DATA_SECTION(GPTimerCC26XX_config, ".const:GPTimerCC26XX_config")
376#pragma DATA_SECTION(gptimerCC26xxHWAttrs, ".const:gptimerCC26xxHWAttrs")
377#endif
378
379/* GPTimer hardware attributes, one per timer part (Timer 0A, 0B, 1A, 1B..) */
380const GPTimerCC26XX_HWAttrs gptimerCC26xxHWAttrs[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
381 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0A, },
382 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0B, },
383 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1A, },
384 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1B, },
385 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2A, },
386 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2B, },
387 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3A, },
388 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3B, },
389};
390
391/* GPTimer objects, one per full-width timer (A+B) (Timer 0, Timer 1..) */
392GPTimerCC26XX_Object gptimerCC26XXObjects[CC2650_I3MOTE_GPTIMERCOUNT];
393
394/* GPTimer configuration (used as GPTimer_Handle by driver and application) */
395const GPTimerCC26XX_Config GPTimerCC26XX_config[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
396 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[0], GPT_A },
397 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[1], GPT_B },
398 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[2], GPT_A },
399 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[3], GPT_B },
400 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[4], GPT_A },
401 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[5], GPT_B },
402 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[6], GPT_A },
403 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[7], GPT_B },
404};
405
406/*
407 * ============================ GPTimer end ===================================
408 */
409
410
411
412/*
413 * ============================= PWM begin ====================================
414 * Remove unused entries to reduce flash usage both in Board.c and Board.h
415 */
416/* Place into subsections to allow the TI linker to remove items properly */
417#if defined(__TI_COMPILER_VERSION__)
418#pragma DATA_SECTION(PWM_config, ".const:PWM_config")
419#pragma DATA_SECTION(pwmtimerCC26xxHWAttrs, ".const:pwmtimerCC26xxHWAttrs")
420#endif
421
422/* PWM configuration, one per PWM output. */
423PWMTimerCC26XX_HwAttrs pwmtimerCC26xxHWAttrs[CC2650_I3MOTE_PWMCOUNT] = {
424 { .pwmPin = Board_PWMPIN0, .gpTimerUnit = Board_GPTIMER0A },
425 { .pwmPin = Board_PWMPIN1, .gpTimerUnit = Board_GPTIMER0B },
426 { .pwmPin = Board_PWMPIN2, .gpTimerUnit = Board_GPTIMER1A },
427 { .pwmPin = Board_PWMPIN3, .gpTimerUnit = Board_GPTIMER1B },
428 { .pwmPin = Board_PWMPIN4, .gpTimerUnit = Board_GPTIMER2A },
429 { .pwmPin = Board_PWMPIN5, .gpTimerUnit = Board_GPTIMER2B },
430 { .pwmPin = Board_PWMPIN6, .gpTimerUnit = Board_GPTIMER3A },
431 { .pwmPin = Board_PWMPIN7, .gpTimerUnit = Board_GPTIMER3B },
432};
433
434/* PWM object, one per PWM output */
435PWMTimerCC26XX_Object pwmtimerCC26xxObjects[CC2650_I3MOTE_PWMCOUNT];
436
437extern const PWM_FxnTable PWMTimerCC26XX_fxnTable;
438
439/* PWM configuration (used as PWM_Handle by driver and application) */
440const PWM_Config PWM_config[CC2650_I3MOTE_PWMCOUNT + 1] = {
441 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[0], &pwmtimerCC26xxHWAttrs[0] },
442 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[1], &pwmtimerCC26xxHWAttrs[1] },
443 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[2], &pwmtimerCC26xxHWAttrs[2] },
444 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[3], &pwmtimerCC26xxHWAttrs[3] },
445 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[4], &pwmtimerCC26xxHWAttrs[4] },
446 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[5], &pwmtimerCC26xxHWAttrs[5] },
447 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[6], &pwmtimerCC26xxHWAttrs[6] },
448 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[7], &pwmtimerCC26xxHWAttrs[7] },
449 { NULL, NULL, NULL }
450};
451
452
453/*
454 * ============================= PWM end ======================================
455 */
456
457/*
458 * ========================== ADCBuf begin =========================================
459 */
460/* Place into subsections to allow the TI linker to remove items properly */
461#if defined(__TI_COMPILER_VERSION__)
462#pragma DATA_SECTION(ADCBuf_config, ".const:ADCBuf_config")
463#pragma DATA_SECTION(adcBufCC26xxHWAttrs, ".const:adcBufCC26xxHWAttrs")
464#pragma DATA_SECTION(ADCBufCC26XX_adcChannelLut, ".const:ADCBufCC26XX_adcChannelLut")
465#endif
466
467/* Include drivers */
468#include <ti/drivers/ADCBuf.h>
469#include <ti/drivers/adcbuf/ADCBufCC26XX.h>
470
471/* ADCBuf objects */
472ADCBufCC26XX_Object adcBufCC26xxObjects[CC2650_I3MOTE_ADCBufCOUNT];
473
474/*
475 * This table converts a virtual adc channel into a dio and internal analogue input signal.
476 * This table is necessary for the functioning of the adcBuf driver.
477 * Comment out unused entries to save flash.
478 * Dio and internal signal pairs are hardwired. Do not remap them in the table. You may reorder entire entries though.
479 * The mapping of dio and internal signals is package dependent.
480 */
481const ADCBufCC26XX_AdcChannelLutEntry ADCBufCC26XX_adcChannelLut[] = {
482 {PIN_UNASSIGNED, ADC_COMPB_IN_VDDS},
483 {PIN_UNASSIGNED, ADC_COMPB_IN_DCOUPL},
484 {PIN_UNASSIGNED, ADC_COMPB_IN_VSS},
485 //{Board_DIO23_ANALOG, ADC_COMPB_IN_AUXIO7},
486 //{Board_DIO24_ANALOG, ADC_COMPB_IN_AUXIO6},
487 //{Board_DIO25_ANALOG, ADC_COMPB_IN_AUXIO5},
488 //{Board_DIO26_ANALOG, ADC_COMPB_IN_AUXIO4},
489 //{Board_DIO27_ANALOG, ADC_COMPB_IN_AUXIO3},
490 //{Board_DIO28_ANALOG, ADC_COMPB_IN_AUXIO2},
491 //{Board_DIO29_ANALOG, ADC_COMPB_IN_AUXIO1},
492 //{Board_DIO30_ANALOG, ADC_COMPB_IN_AUXIO0},
493};
494
495const ADCBufCC26XX_HWAttrs adcBufCC26xxHWAttrs[CC2650_I3MOTE_ADCBufCOUNT] = {
496 {
497 .intPriority = ~0,
498 .swiPriority = 0,
499 .adcChannelLut = ADCBufCC26XX_adcChannelLut,
500 .gpTimerUnit = Board_GPTIMER0A,
501 .gptDMAChannelMask = 1 << UDMA_CHAN_TIMER0_A,
502 }
503};
504
505const ADCBuf_Config ADCBuf_config[] = {
506 {&ADCBufCC26XX_fxnTable, &adcBufCC26xxObjects[0], &adcBufCC26xxHWAttrs[0]},
507 {NULL, NULL, NULL},
508};
509/*
510 * ========================== ADCBuf end =========================================
511 */
512
513
514
515/*
516 * ========================== ADC begin =========================================
517 */
518/* Place into subsections to allow the TI linker to remove items properly */
519#if defined(__TI_COMPILER_VERSION__)
520#pragma DATA_SECTION(ADC_config, ".const:ADC_config")
521#pragma DATA_SECTION(adcCC26xxHWAttrs, ".const:adcCC26xxHWAttrs")
522#endif
523
524/* Include drivers */
525#include <ti/drivers/ADC.h>
526#include <ti/drivers/adc/ADCCC26XX.h>
527
528/* ADC objects */
529ADCCC26XX_Object adcCC26xxObjects[CC2650_I3MOTE_ADCCOUNT];
530
531
532const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC2650_I3MOTE_ADCCOUNT] = {
533 {
534 .adcDIO = Board_DIO23_ANALOG,
535 .adcCompBInput = ADC_COMPB_IN_AUXIO7,
536 .refSource = ADCCC26XX_FIXED_REFERENCE,
537 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
538 .inputScalingEnabled = true,
539 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
540 },
541 {
542 .adcDIO = Board_DIO24_ANALOG,
543 .adcCompBInput = ADC_COMPB_IN_AUXIO6,
544 .refSource = ADCCC26XX_FIXED_REFERENCE,
545 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
546 .inputScalingEnabled = true,
547 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
548 },
549 {
550 .adcDIO = Board_DIO25_ANALOG,
551 .adcCompBInput = ADC_COMPB_IN_AUXIO5,
552 .refSource = ADCCC26XX_FIXED_REFERENCE,
553 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
554 .inputScalingEnabled = true,
555 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
556 },
557 {
558 .adcDIO = Board_DIO26_ANALOG,
559 .adcCompBInput = ADC_COMPB_IN_AUXIO4,
560 .refSource = ADCCC26XX_FIXED_REFERENCE,
561 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
562 .inputScalingEnabled = true,
563 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
564 },
565 {
566 .adcDIO = Board_DIO27_ANALOG,
567 .adcCompBInput = ADC_COMPB_IN_AUXIO3,
568 .refSource = ADCCC26XX_FIXED_REFERENCE,
569 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
570 .inputScalingEnabled = true,
571 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
572 },
573 {
574 .adcDIO = Board_DIO28_ANALOG,
575 .adcCompBInput = ADC_COMPB_IN_AUXIO2,
576 .refSource = ADCCC26XX_FIXED_REFERENCE,
577 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
578 .inputScalingEnabled = true,
579 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
580 },
581 {
582 .adcDIO = Board_DIO29_ANALOG,
583 .adcCompBInput = ADC_COMPB_IN_AUXIO1,
584 .refSource = ADCCC26XX_FIXED_REFERENCE,
585 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
586 .inputScalingEnabled = true,
587 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
588 },
589 {
590 .adcDIO = Board_DIO30_ANALOG,
591 .adcCompBInput = ADC_COMPB_IN_AUXIO0,
592 .refSource = ADCCC26XX_FIXED_REFERENCE,
593 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_10P9_MS,
594 .inputScalingEnabled = true,
595 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
596 },
597 {
598 .adcDIO = PIN_UNASSIGNED,
599 .adcCompBInput = ADC_COMPB_IN_DCOUPL,
600 .refSource = ADCCC26XX_FIXED_REFERENCE,
601 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
602 .inputScalingEnabled = true,
603 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
604 },
605 {
606 .adcDIO = PIN_UNASSIGNED,
607 .adcCompBInput = ADC_COMPB_IN_VSS,
608 .refSource = ADCCC26XX_FIXED_REFERENCE,
609 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
610 .inputScalingEnabled = true,
611 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
612 },
613 {
614 .adcDIO = PIN_UNASSIGNED,
615 .adcCompBInput = ADC_COMPB_IN_VDDS,
616 .refSource = ADCCC26XX_FIXED_REFERENCE,
617 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
618 .inputScalingEnabled = true,
619 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
620 }
621};
622
623const ADC_Config ADC_config[] = {
624 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[0], &adcCC26xxHWAttrs[0]},
625 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[1], &adcCC26xxHWAttrs[1]},
626 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[2], &adcCC26xxHWAttrs[2]},
627 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[3], &adcCC26xxHWAttrs[3]},
628 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[4], &adcCC26xxHWAttrs[4]},
629 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[5], &adcCC26xxHWAttrs[5]},
630 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[6], &adcCC26xxHWAttrs[6]},
631 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[7], &adcCC26xxHWAttrs[7]},
632 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[8], &adcCC26xxHWAttrs[8]},
633 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[9], &adcCC26xxHWAttrs[9]},
634 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[10], &adcCC26xxHWAttrs[10]},
635 {NULL, NULL, NULL},
636};
637
638/*
639 * ========================== ADC end =========================================
640 */
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/CC2650_I3M.h b/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/CC2650_I3M.h
deleted file mode 100644
index 1ab67d2..0000000
--- a/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/CC2650_I3M.h
+++ /dev/null
@@ -1,324 +0,0 @@
1/*
2 * Copyright (c) 2015-2016, Texas Instruments Incorporated
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 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32/** ============================================================================
33 * @file CC2650_I3MOTE.h
34 *
35 * @brief CC2650 LaunchPad Board Specific header file.
36 *
37 * NB! This is the board file for CC2650 LaunchPad PCB version 1.1
38 *
39 * ============================================================================
40 */
41#ifndef __CC2650_I3MOTE_BOARD_H__
42#define __CC2650_I3MOTE_BOARD_H__
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/** ============================================================================
49 * Includes
50 * ==========================================================================*/
51#include <ti/drivers/PIN.h>
52#include <driverlib/ioc.h>
53
54/** ============================================================================
55 * Externs
56 * ==========================================================================*/
57extern const PIN_Config BoardGpioInitTable[];
58
59/** ============================================================================
60 * Defines
61 * ==========================================================================*/
62
63/* Same RF Configuration as 7x7 EM */
64#define CC2650EM_7ID
65#define CC2650_I3MOTE
66
67
68/* Sensors */
69#define Board_INA219_ADDR (0x41)
70#define Board_HDC1000_ADDR (0x43)
71#define Board_HDC1080_ADDR (0x40)
72#define Board_TMP007_ADDR (0x44)
73#define Board_OPT3001_ADDR (0x45)
74#define Board_MPU9250_ADDR (0x68)
75#define Board_BMP280_ADDR (0x77)
76
77
78/* Mapping of pins to board signals using general board aliases
79 * <board signal alias> <pin mapping>
80 */
81/* Discrete outputs */
82/* I2C */
83
84#define Board_I2C0_SDA0 IOID_23
85#define Board_I2C0_SCL0 IOID_24
86
87#define Board_LEDR IOID_5
88#define Board_LEDG IOID_6
89
90#define Board_LED_ON 1
91#define Board_LED_OFF 0
92
93/* Discrete inputs */
94#define Board_BTN1 IOID_4
95#define Board_BTN2 PIN_UNASSIGNED
96
97/* Debug UART */
98#define Board_UART_RX IOID_2 /* RXD */
99#define Board_UART_TX IOID_3 /* TXD */
100
101/* DAC8730 UART */
102//#define Board_UART_TX IOID_8 /* TCD to DAC*/
103//#define Board_UART_RX IOID_9 /* RXD from DAC */
104
105/* SPI Board */
106#define Board_SPI0_IRQ IOID_10
107#define Board_SPI0_MISO IOID_12
108#define Board_SPI0_MOSI IOID_13
109#define Board_SPI0_CLK IOID_14
110#define Board_SPI0_CSN IOID_15
111
112#define Board_SPI1_MISO IOID_18
113#define Board_SPI1_MOSI IOID_19
114#define Board_SPI1_CLK IOID_20
115#define Board_SPI1_CSN IOID_21
116#define Board_SPI1_IRQ IOID_22
117
118/* Power */
119//#define Board_DIO0 IOID_0 // VCCIO_DAC
120//#define Board_DIO1 IOID_1 // GPS_PWR_nEN
121//#define Board_DIO7 IOID_7 // EH_nBYPASS
122//#define Board_DIO25 IOID_25 // SSM_PWR_nEN
123//#define Board_DIO26 IOID_26 // GPS_PWR_nEN
124//#define Board_DIO27 IOID_27 // VBAT_OK
125//#define Board_DIO28 IOID_28 // SSM_5V_EN
126
127/* Misc */
128//#define Board_DIO11 IOID_11 // BSL
129//#define Board_DIO16 IOID_16 // JTAG_TDO
130//#define Board_DIO17 IOID_17 // JTAG_TDI
131
132
133
134/* Analog */
135#define Board_DIO23_ANALOG PIN_UNASSIGNED
136#define Board_DIO24_ANALOG PIN_UNASSIGNED
137#define Board_DIO25_ANALOG PIN_UNASSIGNED
138#define Board_DIO26_ANALOG PIN_UNASSIGNED
139#define Board_DIO27_ANALOG PIN_UNASSIGNED
140#define Board_DIO28_ANALOG PIN_UNASSIGNED
141#define Board_DIO29_ANALOG PIN_UNASSIGNED
142#define Board_DIO30_ANALOG PIN_UNASSIGNED
143
144
145/* PWM outputs */
146#define Board_PWMPIN0 PIN_UNASSIGNED
147#define Board_PWMPIN1 PIN_UNASSIGNED
148#define Board_PWMPIN2 PIN_UNASSIGNED
149#define Board_PWMPIN3 PIN_UNASSIGNED
150#define Board_PWMPIN4 PIN_UNASSIGNED
151#define Board_PWMPIN5 PIN_UNASSIGNED
152#define Board_PWMPIN6 PIN_UNASSIGNED
153#define Board_PWMPIN7 PIN_UNASSIGNED
154
155
156/** ============================================================================
157 * Instance identifiers
158 * ==========================================================================*/
159/* Generic I2C instance identifiers */
160#define Board_I2C CC2650_I3MOTE_I2C0
161/* Generic SPI instance identifiers */
162#define Board_SPI0 CC2650_I3MOTE_SPI0
163#define Board_SPI1 CC2650_I3MOTE_SPI1
164/* Generic UART instance identifiers */
165#define Board_UART CC2650_I3MOTE_UART0
166/* Generic Crypto instance identifiers */
167#define Board_CRYPTO CC2650_I3MOTE_CRYPTO0
168/* Generic GPTimer instance identifiers */
169#define Board_GPTIMER0A CC2650_I3MOTE_GPTIMER0A
170#define Board_GPTIMER0B CC2650_I3MOTE_GPTIMER0B
171#define Board_GPTIMER1A CC2650_I3MOTE_GPTIMER1A
172#define Board_GPTIMER1B CC2650_I3MOTE_GPTIMER1B
173#define Board_GPTIMER2A CC2650_I3MOTE_GPTIMER2A
174#define Board_GPTIMER2B CC2650_I3MOTE_GPTIMER2B
175#define Board_GPTIMER3A CC2650_I3MOTE_GPTIMER3A
176#define Board_GPTIMER3B CC2650_I3MOTE_GPTIMER3B
177/* Generic PWM instance identifiers */
178#define Board_PWM0 CC2650_I3MOTE_PWM0
179#define Board_PWM1 CC2650_I3MOTE_PWM1
180#define Board_PWM2 CC2650_I3MOTE_PWM2
181#define Board_PWM3 CC2650_I3MOTE_PWM3
182#define Board_PWM4 CC2650_I3MOTE_PWM4
183#define Board_PWM5 CC2650_I3MOTE_PWM5
184#define Board_PWM6 CC2650_I3MOTE_PWM6
185#define Board_PWM7 CC2650_I3MOTE_PWM7
186
187/** ============================================================================
188 * Number of peripherals and their names
189 * ==========================================================================*/
190
191/*!
192 * @def CC2650_I3MOTE_I2CName
193 * @brief Enum of I2C names on the CC2650 dev board
194 */
195typedef enum CC2650_I3MOTE_I2CName {
196 CC2650_I3MOTE_I2C0 = 0,
197
198 CC2650_I3MOTE_I2CCOUNT
199} CC2650_I3MOTE_I2CName;
200
201/*!
202 * @def CC2650_I3MOTE_CryptoName
203 * @brief Enum of Crypto names on the CC2650 dev board
204 */
205typedef enum CC2650_I3MOTE_CryptoName {
206 CC2650_I3MOTE_CRYPTO0 = 0,
207
208 CC2650_I3MOTE_CRYPTOCOUNT
209} CC2650_I3MOTE_CryptoName;
210
211
212/*!
213 * @def CC2650_I3MOTE_SPIName
214 * @brief Enum of SPI names on the CC2650 dev board
215 */
216typedef enum CC2650_I3MOTE_SPIName {
217 CC2650_I3MOTE_SPI0 = 0,
218 CC2650_I3MOTE_SPI1,
219
220 CC2650_I3MOTE_SPICOUNT
221} CC2650_I3MOTE_SPIName;
222
223/*!
224 * @def CC2650_I3MOTE_UARTName
225 * @brief Enum of UARTs on the CC2650 dev board
226 */
227typedef enum CC2650_I3MOTE_UARTName {
228 CC2650_I3MOTE_UART0 = 0,
229
230 CC2650_I3MOTE_UARTCOUNT
231} CC2650_I3MOTE_UARTName;
232
233/*!
234 * @def CC2650_I3MOTE_UdmaName
235 * @brief Enum of DMA buffers
236 */
237typedef enum CC2650_I3MOTE_UdmaName {
238 CC2650_I3MOTE_UDMA0 = 0,
239
240 CC2650_I3MOTE_UDMACOUNT
241} CC2650_I3MOTE_UdmaName;
242
243/*!
244 * @def CC2650_I3MOTE_GPTimerName
245 * @brief Enum of GPTimer parts
246 */
247typedef enum CC2650_I3MOTE_GPTimerName
248{
249 CC2650_I3MOTE_GPTIMER0A = 0,
250 CC2650_I3MOTE_GPTIMER0B,
251 CC2650_I3MOTE_GPTIMER1A,
252 CC2650_I3MOTE_GPTIMER1B,
253 CC2650_I3MOTE_GPTIMER2A,
254 CC2650_I3MOTE_GPTIMER2B,
255 CC2650_I3MOTE_GPTIMER3A,
256 CC2650_I3MOTE_GPTIMER3B,
257 CC2650_I3MOTE_GPTIMERPARTSCOUNT
258} CC2650_I3MOTE_GPTimerName;
259
260/*!
261 * @def CC2650_I3MOTE_GPTimers
262 * @brief Enum of GPTimers
263 */
264typedef enum CC2650_I3MOTE_GPTimers
265{
266 CC2650_I3MOTE_GPTIMER0 = 0,
267 CC2650_I3MOTE_GPTIMER1,
268 CC2650_I3MOTE_GPTIMER2,
269 CC2650_I3MOTE_GPTIMER3,
270 CC2650_I3MOTE_GPTIMERCOUNT
271} CC2650_I3MOTE_GPTimers;
272
273/*!
274 * @def CC2650_I3MOTE_PWM
275 * @brief Enum of PWM outputs on the board
276 */
277typedef enum CC2650_I3MOTE_PWM
278{
279 CC2650_I3MOTE_PWM0 = 0,
280 CC2650_I3MOTE_PWM1,
281 CC2650_I3MOTE_PWM2,
282 CC2650_I3MOTE_PWM3,
283 CC2650_I3MOTE_PWM4,
284 CC2650_I3MOTE_PWM5,
285 CC2650_I3MOTE_PWM6,
286 CC2650_I3MOTE_PWM7,
287 CC2650_I3MOTE_PWMCOUNT
288} CC2650_I3MOTE_PWM;
289
290/*!
291 * @def CC2650_I3MOTE_ADCBufName
292 * @brief Enum of ADCs
293 */
294typedef enum CC2650_I3MOTE_ADCBufName {
295 CC2650_I3MOTE_ADCBuf0 = 0,
296 CC2650_I3MOTE_ADCBufCOUNT
297} CC2650_I3MOTE_ADCBufName;
298
299
300/*!
301 * @def CC2650_I3MOTE_ADCName
302 * @brief Enum of ADCs
303 */
304typedef enum CC2650_I3MOTE_ADCName {
305 CC2650_I3MOTE_ADC0 = 0,
306 CC2650_I3MOTE_ADC1,
307 CC2650_I3MOTE_ADC2,
308 CC2650_I3MOTE_ADC3,
309 CC2650_I3MOTE_ADC4,
310 CC2650_I3MOTE_ADC5,
311 CC2650_I3MOTE_ADC6,
312 CC2650_I3MOTE_ADC7,
313 CC2650_I3MOTE_ADCDCOUPL,
314 CC2650_I3MOTE_ADCVSS,
315 CC2650_I3MOTE_ADCVDDS,
316 CC2650_I3MOTE_ADCCOUNT
317} CC2650_I3MOTE_ADCName;
318
319
320#ifdef __cplusplus
321}
322#endif
323
324#endif /* __CC2650_I3MOTE_BOARD_H__ */
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/main.c b/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/main.c
index d56b5b5..4d2d3f5 100644
--- a/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/main.c
+++ b/Basic-Test-Package/CC2650/Test_CC2650_DebugUART_EchoPC/main.c
@@ -102,7 +102,7 @@ int main(void)
102 102
103 /* Construct heartBeat Task thread */ 103 /* Construct heartBeat Task thread */
104 Task_Params_init(&taskParams); 104 Task_Params_init(&taskParams);
105 taskParams.arg0 = 500000 / Clock_tickPeriod; 105 taskParams.arg0 = 2000000 / Clock_tickPeriod;
106 taskParams.stackSize = TASKSTACKSIZE; 106 taskParams.stackSize = TASKSTACKSIZE;
107 taskParams.stack = &task0Stack; 107 taskParams.stack = &task0Stack;
108 Task_construct(&task0Struct, (Task_FuncPtr)heartBeatFxn, &taskParams, NULL); 108 Task_construct(&task0Struct, (Task_FuncPtr)heartBeatFxn, &taskParams, NULL);
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_I2C_Sensors/CC2650_I3M.c b/Basic-Test-Package/CC2650/Test_CC2650_I2C_Sensors/CC2650_I3M.c
deleted file mode 100644
index f3e0087..0000000
--- a/Basic-Test-Package/CC2650/Test_CC2650_I2C_Sensors/CC2650_I3M.c
+++ /dev/null
@@ -1,640 +0,0 @@
1/*
2 * Copyright (c) 2016, Texas Instruments Incorporated
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 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/*
34 * ====================== CC2650_I3MOTE.c ===================================
35 * This file is responsible for setting up the board specific items for the
36 * CC2650 LaunchPad.
37 */
38
39
40/*
41 * ====================== Includes ============================================
42 */
43#include <xdc/std.h>
44#include <xdc/runtime/System.h>
45
46#include <ti/sysbios/family/arm/m3/Hwi.h>
47#include <ti/drivers/PIN.h>
48#include <ti/drivers/pin/PINCC26XX.h>
49#include <ti/drivers/PWM.h>
50#include <ti/drivers/pwm/PWMTimerCC26XX.h>
51#include <ti/drivers/timer/GPTimerCC26XX.h>
52#include <ti/drivers/Power.h>
53#include <ti/drivers/power/PowerCC26XX.h>
54
55#include <inc/hw_memmap.h>
56#include <inc/hw_ints.h>
57#include <driverlib/ioc.h>
58#include <driverlib/udma.h>
59
60#include <Board.h>
61
62/*
63 * ========================= IO driver initialization =========================
64 * From main, PIN_init(BoardGpioInitTable) should be called to setup safe
65 * settings for this board.
66 * When a pin is allocated and then de-allocated, it will revert to the state
67 * configured in this table.
68 */
69/* Place into subsections to allow the TI linker to remove items properly */
70#if defined(__TI_COMPILER_VERSION__)
71#pragma DATA_SECTION(BoardGpioInitTable, ".const:BoardGpioInitTable")
72#pragma DATA_SECTION(PINCC26XX_hwAttrs, ".const:PINCC26XX_hwAttrs")
73#endif
74
75const PIN_Config BoardGpioInitTable[] = {
76
77 Board_LEDR | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
78 Board_LEDG | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
79 Board_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
80 Board_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, /* UART RX via debugger back channel */
81 Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* UART TX via debugger back channel */
82 PIN_TERMINATE
83};
84
85const PINCC26XX_HWAttrs PINCC26XX_hwAttrs = {
86 .intPriority = ~0,
87 .swiPriority = 0
88};
89/*============================================================================*/
90
91/*
92 * ============================= Power begin ==================================
93 */
94/* Place into subsections to allow the TI linker to remove items properly */
95#if defined(__TI_COMPILER_VERSION__)
96#pragma DATA_SECTION(PowerCC26XX_config, ".const:PowerCC26XX_config")
97#endif
98const PowerCC26XX_Config PowerCC26XX_config = {
99 .policyInitFxn = NULL,
100 .policyFxn = &PowerCC26XX_standbyPolicy,
101 .calibrateFxn = &PowerCC26XX_calibrate,
102 .enablePolicy = TRUE,
103 .calibrateRCOSC_LF = TRUE,
104 .calibrateRCOSC_HF = TRUE,
105};
106/*
107 * ============================= Power end ====================================
108 */
109
110/*
111 * ============================= UART begin ===================================
112 */
113/* Place into subsections to allow the TI linker to remove items properly */
114#if defined(__TI_COMPILER_VERSION__)
115#pragma DATA_SECTION(UART_config, ".const:UART_config")
116#pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
117#endif
118
119/* Include drivers */
120#include <ti/drivers/UART.h>
121#include <ti/drivers/uart/UARTCC26XX.h>
122
123/* UART objects */
124UARTCC26XX_Object uartCC26XXObjects[CC2650_I3MOTE_UARTCOUNT];
125
126/* UART hardware parameter structure, also used to assign UART pins */
127const UARTCC26XX_HWAttrsV1 uartCC26XXHWAttrs[CC2650_I3MOTE_UARTCOUNT] = {
128 {
129 .baseAddr = UART0_BASE,
130 .powerMngrId = PowerCC26XX_PERIPH_UART0,
131 .intNum = INT_UART0_COMB,
132 .intPriority = ~0,
133 .swiPriority = 0,
134 .txPin = Board_UART_TX,
135 .rxPin = Board_UART_RX,
136 .ctsPin = PIN_UNASSIGNED,
137 .rtsPin = PIN_UNASSIGNED
138 }
139};
140
141/* UART configuration structure */
142const UART_Config UART_config[] = {
143 {
144 .fxnTablePtr = &UARTCC26XX_fxnTable,
145 .object = &uartCC26XXObjects[0],
146 .hwAttrs = &uartCC26XXHWAttrs[0]
147 },
148 {NULL, NULL, NULL}
149};
150/*
151 * ============================= UART end =====================================
152 */
153
154/*
155 * ============================= UDMA begin ===================================
156 */
157/* Place into subsections to allow the TI linker to remove items properly */
158#if defined(__TI_COMPILER_VERSION__)
159#pragma DATA_SECTION(UDMACC26XX_config, ".const:UDMACC26XX_config")
160#pragma DATA_SECTION(udmaHWAttrs, ".const:udmaHWAttrs")
161#endif
162
163/* Include drivers */
164#include <ti/drivers/dma/UDMACC26XX.h>
165
166/* UDMA objects */
167UDMACC26XX_Object udmaObjects[CC2650_I3MOTE_UDMACOUNT];
168
169/* UDMA configuration structure */
170const UDMACC26XX_HWAttrs udmaHWAttrs[CC2650_I3MOTE_UDMACOUNT] = {
171 {
172 .baseAddr = UDMA0_BASE,
173 .powerMngrId = PowerCC26XX_PERIPH_UDMA,
174 .intNum = INT_DMA_ERR,
175 .intPriority = ~0
176 }
177};
178
179/* UDMA configuration structure */
180const UDMACC26XX_Config UDMACC26XX_config[] = {
181 {
182 .object = &udmaObjects[0],
183 .hwAttrs = &udmaHWAttrs[0]
184 },
185 {NULL, NULL}
186};
187/*
188 * ============================= UDMA end =====================================
189 */
190
191/*
192 * ========================== SPI DMA begin ===================================
193 */
194/* Place into subsections to allow the TI linker to remove items properly */
195#if defined(__TI_COMPILER_VERSION__)
196#pragma DATA_SECTION(SPI_config, ".const:SPI_config")
197#pragma DATA_SECTION(spiCC26XXDMAHWAttrs, ".const:spiCC26XXDMAHWAttrs")
198#endif
199
200/* Include drivers */
201#include <ti/drivers/spi/SPICC26XXDMA.h>
202
203/* SPI objects */
204SPICC26XXDMA_Object spiCC26XXDMAObjects[CC2650_I3MOTE_SPICOUNT];
205
206/* SPI configuration structure, describing which pins are to be used */
207const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2650_I3MOTE_SPICOUNT] = {
208 {
209 .baseAddr = SSI0_BASE,
210 .intNum = INT_SSI0_COMB,
211 .intPriority = ~0,
212 .swiPriority = 0,
213 .powerMngrId = PowerCC26XX_PERIPH_SSI0,
214 .defaultTxBufValue = 0,
215 .rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
216 .txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
217 .mosiPin = Board_SPI0_MOSI,
218 .misoPin = Board_SPI0_MISO,
219 .clkPin = Board_SPI0_CLK,
220 .csnPin = Board_SPI0_CSN
221 },
222 {
223 .baseAddr = SSI1_BASE,
224 .intNum = INT_SSI1_COMB,
225 .intPriority = ~0,
226 .swiPriority = 0,
227 .powerMngrId = PowerCC26XX_PERIPH_SSI1,
228 .defaultTxBufValue = 0,
229 .rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
230 .txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
231 .mosiPin = Board_SPI1_MOSI,
232 .misoPin = Board_SPI1_MISO,
233 .clkPin = Board_SPI1_CLK,
234 .csnPin = Board_SPI1_CSN
235 }
236};
237
238/* SPI configuration structure */
239const SPI_Config SPI_config[] = {
240 {
241 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
242 .object = &spiCC26XXDMAObjects[0],
243 .hwAttrs = &spiCC26XXDMAHWAttrs[0]
244 },
245 {
246 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
247 .object = &spiCC26XXDMAObjects[1],
248 .hwAttrs = &spiCC26XXDMAHWAttrs[1]
249 },
250 {NULL, NULL, NULL}
251};
252/*
253 * ========================== SPI DMA end =====================================
254*/
255
256
257/*
258 * ============================= I2C Begin=====================================
259*/
260/* Place into subsections to allow the TI linker to remove items properly */
261#if defined(__TI_COMPILER_VERSION__)
262#pragma DATA_SECTION(I2C_config, ".const:I2C_config")
263#pragma DATA_SECTION(i2cCC26xxHWAttrs, ".const:i2cCC26xxHWAttrs")
264#endif
265
266/* Include drivers */
267#include <ti/drivers/i2c/I2CCC26XX.h>
268
269/* I2C objects */
270I2CCC26XX_Object i2cCC26xxObjects[CC2650_I3MOTE_I2CCOUNT];
271
272/* I2C configuration structure, describing which pins are to be used */
273const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_I3MOTE_I2CCOUNT] = {
274 {
275 .baseAddr = I2C0_BASE,
276 .powerMngrId = PowerCC26XX_PERIPH_I2C0,
277 .intNum = INT_I2C_IRQ,
278 .intPriority = ~0,
279 .swiPriority = 0,
280 .sdaPin = Board_I2C0_SDA0,
281 .sclPin = Board_I2C0_SCL0,
282 }
283};
284
285/* I2C configuration structure */
286const I2C_Config I2C_config[] = {
287 {
288 .fxnTablePtr = &I2CCC26XX_fxnTable,
289 .object = &i2cCC26xxObjects[0],
290 .hwAttrs = &i2cCC26xxHWAttrs[0]
291 },
292 {NULL, NULL, NULL}
293};
294/*
295 * ========================== I2C end =========================================
296 */
297
298/*
299 * ========================== Crypto begin ====================================
300 * NOTE: The Crypto implementation should be considered experimental
301 * and not validated!
302 */
303/* Place into subsections to allow the TI linker to remove items properly */
304#if defined(__TI_COMPILER_VERSION__)
305#pragma DATA_SECTION(CryptoCC26XX_config, ".const:CryptoCC26XX_config")
306#pragma DATA_SECTION(cryptoCC26XXHWAttrs, ".const:cryptoCC26XXHWAttrs")
307#endif
308
309/* Include drivers */
310#include <ti/drivers/crypto/CryptoCC26XX.h>
311
312/* Crypto objects */
313CryptoCC26XX_Object cryptoCC26XXObjects[CC2650_I3MOTE_CRYPTOCOUNT];
314
315/* Crypto configuration structure, describing which pins are to be used */
316const CryptoCC26XX_HWAttrs cryptoCC26XXHWAttrs[CC2650_I3MOTE_CRYPTOCOUNT] = {
317 {
318 .baseAddr = CRYPTO_BASE,
319 .powerMngrId = PowerCC26XX_PERIPH_CRYPTO,
320 .intNum = INT_CRYPTO_RESULT_AVAIL_IRQ,
321 .intPriority = ~0,
322 }
323};
324
325/* Crypto configuration structure */
326const CryptoCC26XX_Config CryptoCC26XX_config[] = {
327 {
328 .object = &cryptoCC26XXObjects[0],
329 .hwAttrs = &cryptoCC26XXHWAttrs[0]
330 },
331 {NULL, NULL}
332};
333/*
334 * ========================== Crypto end ======================================
335 */
336
337
338/*
339 * ========================= RF driver begin ==================================
340 */
341/* Place into subsections to allow the TI linker to remove items properly */
342#if defined(__TI_COMPILER_VERSION__)
343#pragma DATA_SECTION(RFCC26XX_hwAttrs, ".const:RFCC26XX_hwAttrs")
344#endif
345
346/* Include drivers */
347#include <ti/drivers/rf/RF.h>
348
349/* RF hwi and swi priority */
350const RFCC26XX_HWAttrs RFCC26XX_hwAttrs = {
351 .hwiCpe0Priority = ~0,
352 .hwiHwPriority = ~0,
353 .swiCpe0Priority = 0,
354 .swiHwPriority = 0,
355};
356
357/*
358 * ========================== RF driver end ===================================
359 */
360
361/*
362 * ========================= Display begin ====================================
363 */
364
365/*
366 * ========================= Display end ======================================
367 */
368
369/*
370 * ============================ GPTimer begin =================================
371 * Remove unused entries to reduce flash usage both in Board.c and Board.h
372 */
373/* Place into subsections to allow the TI linker to remove items properly */
374#if defined(__TI_COMPILER_VERSION__)
375#pragma DATA_SECTION(GPTimerCC26XX_config, ".const:GPTimerCC26XX_config")
376#pragma DATA_SECTION(gptimerCC26xxHWAttrs, ".const:gptimerCC26xxHWAttrs")
377#endif
378
379/* GPTimer hardware attributes, one per timer part (Timer 0A, 0B, 1A, 1B..) */
380const GPTimerCC26XX_HWAttrs gptimerCC26xxHWAttrs[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
381 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0A, },
382 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0B, },
383 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1A, },
384 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1B, },
385 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2A, },
386 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2B, },
387 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3A, },
388 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3B, },
389};
390
391/* GPTimer objects, one per full-width timer (A+B) (Timer 0, Timer 1..) */
392GPTimerCC26XX_Object gptimerCC26XXObjects[CC2650_I3MOTE_GPTIMERCOUNT];
393
394/* GPTimer configuration (used as GPTimer_Handle by driver and application) */
395const GPTimerCC26XX_Config GPTimerCC26XX_config[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
396 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[0], GPT_A },
397 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[1], GPT_B },
398 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[2], GPT_A },
399 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[3], GPT_B },
400 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[4], GPT_A },
401 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[5], GPT_B },
402 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[6], GPT_A },
403 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[7], GPT_B },
404};
405
406/*
407 * ============================ GPTimer end ===================================
408 */
409
410
411
412/*
413 * ============================= PWM begin ====================================
414 * Remove unused entries to reduce flash usage both in Board.c and Board.h
415 */
416/* Place into subsections to allow the TI linker to remove items properly */
417#if defined(__TI_COMPILER_VERSION__)
418#pragma DATA_SECTION(PWM_config, ".const:PWM_config")
419#pragma DATA_SECTION(pwmtimerCC26xxHWAttrs, ".const:pwmtimerCC26xxHWAttrs")
420#endif