BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bsp430_config.h
Go to the documentation of this file.
1 /* Copyright 2012-2014, Peter A. Bigot
2  *
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 are met:
7  *
8  * * Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * * Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * * Neither the name of the software nor the names of its contributors may be
16  * used to endorse or promote products derived from this software without
17  * specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
39 #ifndef BSP430_PLATFORM_EXP430FR5969_BSP430_CONFIG_H
40 #define BSP430_PLATFORM_EXP430FR5969_BSP430_CONFIG_H
41 
44 /* Use native EUSCI for genericized serial port unless told not to */
45 #ifndef configBSP430_SERIAL_USE_EUSCI
46 #define configBSP430_SERIAL_USE_EUSCI 1
47 #endif /* configBSP430_SERIAL_USE_EUSCI */
48 
49 /* Use the back-channel UART through the USB as the console.
50  * The one on A.3/A.4 is EUSCI_A1. */
51 #if (configBSP430_CONSOLE - 0)
52 #ifndef BSP430_CONSOLE_SERIAL_PERIPH_CPPID
53 #define BSP430_CONSOLE_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_EUSCI_A0
54 #endif /* BSP430_CONSOLE_SERIAL_PERIPH_CPPID */
55 #endif /* configBSP430_CONSOLE */
56 
57 /* Enable buttons as requested */
58 #if (configBSP430_PLATFORM_BUTTON0 - 0)
59 #if !defined(configBSP430_HAL_PORT4)
60 #define configBSP430_HAL_PORT4 1
61 #else /* configBSP430_HAL_PORT4 */
62 #if (configBSP430_PLATFORM_BUTTON0 - 0) && ! defined(configBSP430_HPL_PORT4)
63 #define configBSP430_HPL_PORT4 1
64 #endif /* BUTTON0 */
65 #endif /* configBSP430_HAL_PORT4 */
66 #endif /* configBSP430_PLATFORM_BUTTON0 */
67 
68 #if (configBSP430_PLATFORM_BUTTON1 - 0)
69 #if !defined(configBSP430_HAL_PORT1)
70 #define configBSP430_HAL_PORT1 1
71 #else /* configBSP430_HAL_PORT1 */
72 #if (configBSP430_PLATFORM_BUTTON1 - 0) && ! defined(configBSP430_HPL_PORT1)
73 #define configBSP430_HPL_PORT1 1
74 #endif /* BUTTON1 */
75 #endif /* configBSP430_HAL_PORT1 */
76 #endif /* configBSP430_PLATFORM_BUTTON1 */
77 
78 /* How to use ACLK as a capture/compare input source */
79 /* Settings for TA1: T1A2 ccis=1 ; clk P1.1 ; cc0 P1.7 ; cc1 P1.2 */
80 #if (configBSP430_TIMER_CCACLK - 0)
81 #ifndef BSP430_TIMER_CCACLK_PERIPH_CPPID
82 #define BSP430_TIMER_CCACLK_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
83 #endif /* BSP430_TIMER_CCACLK_PERIPH_CPPID */
84 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID
85 #define BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
86 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID */
87 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID
88 #define BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
89 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID */
90 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID
91 #define BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
92 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID */
93 #endif /* configBSP430_TIMER_CCACLK */
94 
95 /* !BSP430! insert=emk_config boosterpack=cc3000boost platform=exp430fr5969 mcu=msp430fr5969 spi=UCB0SOMI tag=cc3000 hal=CSn gpio=IRQn */
96 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_config] */
97 #if (configBSP430_RF_CC3000BOOST - 0)
98 #define BSP430_RF_CC3000_SPI_PERIPH_CPPID BSP430_PERIPH_CPPID_EUSCI_B0
99 #define configBSP430_SERIAL_ENABLE_SPI 1
100 #define configBSP430_HAL_EUSCI_B0 1
101 #define BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
102 #define BSP430_RF_CC3000_SCLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
103 #define BSP430_RF_CC3000_IRQn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
104 #define BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
105 #define BSP430_RF_CC3000_CSn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
106 #define BSP430_RF_CC3000_MOSI_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
107 #define BSP430_RF_CC3000_MISO_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
108 /* Request HAL (and HPL) for all GPIO and HAL-enabled ports */
109 #define BSP430_WANT_CONFIG_HAL 1
110 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_IRQn_PORT_PERIPH_CPPID
111 #include <bsp430/periph/want_.h>
112 #undef BSP430_WANT_PERIPH_CPPID
113 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_CSn_PORT_PERIPH_CPPID
114 #include <bsp430/periph/want_.h>
115 #undef BSP430_WANT_PERIPH_CPPID
116 #undef BSP430_WANT_CONFIG_HAL
117 /* Request HPL for all non-GPIO ports */
118 #define BSP430_WANT_CONFIG_HPL 1
119 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_CPPID
120 #include <bsp430/periph/want_.h>
121 #undef BSP430_WANT_PERIPH_CPPID
122 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_SCLK_PORT_PERIPH_CPPID
123 #include <bsp430/periph/want_.h>
124 #undef BSP430_WANT_PERIPH_CPPID
125 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_MOSI_PORT_PERIPH_CPPID
126 #include <bsp430/periph/want_.h>
127 #undef BSP430_WANT_PERIPH_CPPID
128 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_MISO_PORT_PERIPH_CPPID
129 #include <bsp430/periph/want_.h>
130 #undef BSP430_WANT_PERIPH_CPPID
131 #undef BSP430_WANT_CONFIG_HPL
132 /* Request HAL for GPIO timers */
133 #define BSP430_WANT_CONFIG_HAL 1
134 
135 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID)
136 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID
137 #if 0 == BSP430_RF_CC3000_IRQn_TIMER_CCIDX
138 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
139 #else /* BSP430_RF_CC3000_IRQn_TIMER_CCIDX */
140 #define BSP430_WANT_CONFIG_HAL_ISR 1
141 #endif /* BSP430_RF_CC3000_IRQn_TIMER_CCIDX */
142 #include <bsp430/periph/want_.h>
143 #undef BSP430_WANT_CONFIG_HAL_ISR
144 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
145 #undef BSP430_WANT_PERIPH_CPPID
146 #endif /* BSP430_RF_CC3000_IRQn timer */
147 #undef BSP430_WANT_CONFIG_HAL
148 #endif /* configBSP430_RF_CC3000BOOST */
149 /* END AUTOMATICALLY GENERATED CODE [emk_config] */
150 /* !BSP430! end=emk_config */
151 
152 /* !BSP430! insert=emk_config boosterpack=anaren_cc110l platform=exp430fr5969 mcu=msp430fr5969 spi=UCB0SOMI tag=cc110x hal=CSn gpio=GDO0,GDO1,GDO2 */
153 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_config] */
154 #if (configBSP430_RF_ANAREN_CC110L - 0)
155 #define BSP430_RF_CC110X_SPI_PERIPH_CPPID BSP430_PERIPH_CPPID_EUSCI_B0
156 #define configBSP430_SERIAL_ENABLE_SPI 1
157 #define configBSP430_HAL_EUSCI_B0 1
158 #define BSP430_RF_CC110X_GDO2_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
159 #define BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
160 #define BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
161 #define BSP430_RF_CC110X_CSn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
162 #define BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
163 #define BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
164 /* Request HAL (and HPL) for all GPIO and HAL-enabled ports */
165 #define BSP430_WANT_CONFIG_HAL 1
166 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO2_PORT_PERIPH_CPPID
167 #include <bsp430/periph/want_.h>
168 #undef BSP430_WANT_PERIPH_CPPID
169 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID
170 #include <bsp430/periph/want_.h>
171 #undef BSP430_WANT_PERIPH_CPPID
172 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_CSn_PORT_PERIPH_CPPID
173 #include <bsp430/periph/want_.h>
174 #undef BSP430_WANT_PERIPH_CPPID
175 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID
176 #include <bsp430/periph/want_.h>
177 #undef BSP430_WANT_PERIPH_CPPID
178 #undef BSP430_WANT_CONFIG_HAL
179 /* Request HAL for GPIO timers */
180 #define BSP430_WANT_CONFIG_HAL 1
181 
182 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID)
183 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID
184 #if 0 == BSP430_RF_CC110X_GDO2_TIMER_CCIDX
185 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
186 #else /* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
187 #define BSP430_WANT_CONFIG_HAL_ISR 1
188 #endif /* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
189 #include <bsp430/periph/want_.h>
190 #undef BSP430_WANT_CONFIG_HAL_ISR
191 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
192 #undef BSP430_WANT_PERIPH_CPPID
193 #endif /* BSP430_RF_CC110X_GDO2 timer */
194 
195 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID)
196 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID
197 #if 0 == BSP430_RF_CC110X_GDO0_TIMER_CCIDX
198 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
199 #else /* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
200 #define BSP430_WANT_CONFIG_HAL_ISR 1
201 #endif /* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
202 #include <bsp430/periph/want_.h>
203 #undef BSP430_WANT_CONFIG_HAL_ISR
204 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
205 #undef BSP430_WANT_PERIPH_CPPID
206 #endif /* BSP430_RF_CC110X_GDO0 timer */
207 
208 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID)
209 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID
210 #if 0 == BSP430_RF_CC110X_GDO1_TIMER_CCIDX
211 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
212 #else /* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
213 #define BSP430_WANT_CONFIG_HAL_ISR 1
214 #endif /* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
215 #include <bsp430/periph/want_.h>
216 #undef BSP430_WANT_CONFIG_HAL_ISR
217 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
218 #undef BSP430_WANT_PERIPH_CPPID
219 #endif /* BSP430_RF_CC110X_GDO1 timer */
220 #undef BSP430_WANT_CONFIG_HAL
221 #endif /* configBSP430_RF_ANAREN_CC110L */
222 /* END AUTOMATICALLY GENERATED CODE [emk_config] */
223 /* !BSP430! end=emk_config */
224 
225 /* !BSP430! insert=rfem_config boosterpack=ccem platform=exp430fr5969 mcu=msp430fr5969 */
226 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [rfem_config] */
227 #if (configBSP430_RFEM_CCEM - 0)
228 #define BSP430_RFEM_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_EUSCI_B0
229 #define configBSP430_SERIAL_ENABLE_SPI 1
230 #define configBSP430_HAL_EUSCI_B0 1
231 #define BSP430_RFEM_RF1P3_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
232 #define BSP430_RFEM_RF1P3_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
233 #define BSP430_RFEM_RF1P7_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
234 #define BSP430_RFEM_RF1P7_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
235 #define BSP430_RFEM_RF1P9_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
236 #define BSP430_RFEM_RF1P10_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
237 #define BSP430_RFEM_RF1P10_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
238 #define BSP430_RFEM_RF1P12_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
239 #define BSP430_RFEM_RF1P14_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
240 #define BSP430_RFEM_RF1P16_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
241 #define BSP430_RFEM_RF1P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
242 #define BSP430_RFEM_RF1P18_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
243 #define BSP430_RFEM_RF1P20_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
244 #define BSP430_RFEM_RF1P20_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
245 #define BSP430_RFEM_RF2P15_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
246 #define BSP430_RFEM_RF2P15_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
247 #define BSP430_RFEM_RF2P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
248 #define BSP430_RFEM_RF2P18_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
249 #define BSP430_RFEM_RF2P19_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
250 #define BSP430_RFEM_RF2P19_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
251 #endif /* configBSP430_RFEM_CCEM */
252 /* END AUTOMATICALLY GENERATED CODE [rfem_config] */
253 /* !BSP430! end=rfem_config */
254 
255 #if (configBSP430_PLATFORM_BOOSTERPACK_SHARP96 - 0)
256 /* CS on P2.4, LCD_EN on P4.3, PWR_en on P4.2, SPI on EUSCI_B0 */
257 #define configBSP430_HPL_PORT2 1
258 #define configBSP430_HPL_PORT4 1
259 #define configBSP430_HAL_EUSCI_B0 1
260 #define configBSP430_SERIAL_ENABLE_SPI 1
261 #endif /* configBSP430_PLATFORM_BOOSTERPACK_SHARP96 */
262 
265 #endif /* BSP430_PLATFORM_EXP430FR5969_BSP430_CONFIG_H */
Translate functional resource requests to core resource requests.