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_EXP430F5529LP_BSP430_CONFIG_H
40 #define BSP430_PLATFORM_EXP430F5529LP_BSP430_CONFIG_H
41 
43 #ifndef configBSP430_PERIPH_XT2
44 #define configBSP430_PERIPH_XT2 1
45 #endif /* configBSP430_PERIPH_XT2 */
46 
49 /* Use native USCI5 for genericized serial port unless told not to */
50 #ifndef configBSP430_SERIAL_USE_USCI5
51 #define configBSP430_SERIAL_USE_USCI5 1
52 #endif /* configBSP430_SERIAL_USE_USCI5 */
53 
54 /* Enable buttons as requested */
55 #if (configBSP430_PLATFORM_BUTTON0 - 0)
56 #if !defined(configBSP430_HAL_PORT2)
57 #define configBSP430_HAL_PORT2 1
58 #else /* configBSP430_HAL_PORT2 */
59 #define configBSP430_HPL_PORT2 1
60 #endif /* configBSP430_HAL_PORT2 */
61 #endif /* configBSP430_PLATFORM_BUTTON0 */
62 #if (configBSP430_PLATFORM_BUTTON1 - 0)
63 #if !defined(configBSP430_HAL_PORT1)
64 #define configBSP430_HAL_PORT1 1
65 #else /* configBSP430_HAL_PORT1 */
66 #define configBSP430_HPL_PORT1 1
67 #endif /* configBSP430_HAL_PORT1 */
68 #endif /* configBSP430_PLATFORM_BUTTON1 */
69 
70 /* What to use as a console */
71 #if (configBSP430_CONSOLE - 0)
72 #ifndef BSP430_CONSOLE_SERIAL_PERIPH_CPPID
73 #define BSP430_CONSOLE_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI5_A1
74 #endif /* BSP430_CONSOLE_SERIAL_PERIPH_CPPID */
75 #endif /* configBSP430_CONSOLE */
76 
77 /* How to use ACLK as a capture/compare input source */
78 /* Settings for TA2: T2A2 ccis=1 ; clk P2.2 ; cc0 P2.3 ; cc1 P2.4 */
79 #if (configBSP430_TIMER_CCACLK - 0)
80 #ifndef BSP430_TIMER_CCACLK_PERIPH_CPPID
81 #define BSP430_TIMER_CCACLK_PERIPH_CPPID BSP430_PERIPH_CPPID_TA2
82 #endif /* BSP430_TIMER_CCACLK_PERIPH_CPPID */
83 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID
84 #define BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
85 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID */
86 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID
87 #define BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
88 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID */
89 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID
90 #define BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
91 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID */
92 #endif /* configBSP430_TIMER_CCACLK */
93 
94 /* !BSP430! insert=emk_config boosterpack=cc3000boost platform=exp430f5529lp mcu=msp430f5529 spi=UCB0SOMI tag=cc3000 hal=CSn gpio=IRQn */
95 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_config] */
96 #if (configBSP430_RF_CC3000BOOST - 0)
97 #define BSP430_RF_CC3000_SPI_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI5_B0
98 #define configBSP430_SERIAL_ENABLE_SPI 1
99 #define configBSP430_HAL_USCI5_B0 1
100 #define BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT6
101 #define BSP430_RF_CC3000_SCLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
102 #define BSP430_RF_CC3000_IRQn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
103 #define BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
104 #define BSP430_RF_CC3000_CSn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
105 #define BSP430_RF_CC3000_MOSI_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
106 #define BSP430_RF_CC3000_MISO_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
107 /* Request HAL (and HPL) for all GPIO and HAL-enabled ports */
108 #define BSP430_WANT_CONFIG_HAL 1
109 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_IRQn_PORT_PERIPH_CPPID
110 #include <bsp430/periph/want_.h>
111 #undef BSP430_WANT_PERIPH_CPPID
112 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_CSn_PORT_PERIPH_CPPID
113 #include <bsp430/periph/want_.h>
114 #undef BSP430_WANT_PERIPH_CPPID
115 #undef BSP430_WANT_CONFIG_HAL
116 /* Request HPL for all non-GPIO ports */
117 #define BSP430_WANT_CONFIG_HPL 1
118 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_CPPID
119 #include <bsp430/periph/want_.h>
120 #undef BSP430_WANT_PERIPH_CPPID
121 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_SCLK_PORT_PERIPH_CPPID
122 #include <bsp430/periph/want_.h>
123 #undef BSP430_WANT_PERIPH_CPPID
124 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_MOSI_PORT_PERIPH_CPPID
125 #include <bsp430/periph/want_.h>
126 #undef BSP430_WANT_PERIPH_CPPID
127 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_MISO_PORT_PERIPH_CPPID
128 #include <bsp430/periph/want_.h>
129 #undef BSP430_WANT_PERIPH_CPPID
130 #undef BSP430_WANT_CONFIG_HPL
131 /* Request HAL for GPIO timers */
132 #define BSP430_WANT_CONFIG_HAL 1
133 
134 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID)
135 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID
136 #if 0 == BSP430_RF_CC3000_IRQn_TIMER_CCIDX
137 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
138 #else /* BSP430_RF_CC3000_IRQn_TIMER_CCIDX */
139 #define BSP430_WANT_CONFIG_HAL_ISR 1
140 #endif /* BSP430_RF_CC3000_IRQn_TIMER_CCIDX */
141 #include <bsp430/periph/want_.h>
142 #undef BSP430_WANT_CONFIG_HAL_ISR
143 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
144 #undef BSP430_WANT_PERIPH_CPPID
145 #endif /* BSP430_RF_CC3000_IRQn timer */
146 #undef BSP430_WANT_CONFIG_HAL
147 #endif /* configBSP430_RF_CC3000BOOST */
148 /* END AUTOMATICALLY GENERATED CODE [emk_config] */
149 /* !BSP430! end=emk_config */
150 
151 /* !BSP430! insert=emk_config boosterpack=anaren_cc110l platform=exp430f5529lp mcu=msp430f5529 spi=UCB0SOMI tag=cc110x hal=CSn gpio=GDO0,GDO1,GDO2 */
152 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_config] */
153 #if (configBSP430_RF_ANAREN_CC110L - 0)
154 #define BSP430_RF_CC110X_SPI_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI5_B0
155 #define configBSP430_SERIAL_ENABLE_SPI 1
156 #define configBSP430_HAL_USCI5_B0 1
157 #define BSP430_RF_CC110X_GDO2_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT6
158 #define BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
159 #define BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
160 #define BSP430_RF_CC110X_CSn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
161 #define BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
162 /* Request HAL (and HPL) for all GPIO and HAL-enabled ports */
163 #define BSP430_WANT_CONFIG_HAL 1
164 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO2_PORT_PERIPH_CPPID
165 #include <bsp430/periph/want_.h>
166 #undef BSP430_WANT_PERIPH_CPPID
167 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID
168 #include <bsp430/periph/want_.h>
169 #undef BSP430_WANT_PERIPH_CPPID
170 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_CSn_PORT_PERIPH_CPPID
171 #include <bsp430/periph/want_.h>
172 #undef BSP430_WANT_PERIPH_CPPID
173 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID
174 #include <bsp430/periph/want_.h>
175 #undef BSP430_WANT_PERIPH_CPPID
176 #undef BSP430_WANT_CONFIG_HAL
177 /* Request HAL for GPIO timers */
178 #define BSP430_WANT_CONFIG_HAL 1
179 
180 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID)
181 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID
182 #if 0 == BSP430_RF_CC110X_GDO2_TIMER_CCIDX
183 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
184 #else /* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
185 #define BSP430_WANT_CONFIG_HAL_ISR 1
186 #endif /* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
187 #include <bsp430/periph/want_.h>
188 #undef BSP430_WANT_CONFIG_HAL_ISR
189 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
190 #undef BSP430_WANT_PERIPH_CPPID
191 #endif /* BSP430_RF_CC110X_GDO2 timer */
192 
193 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID)
194 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID
195 #if 0 == BSP430_RF_CC110X_GDO0_TIMER_CCIDX
196 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
197 #else /* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
198 #define BSP430_WANT_CONFIG_HAL_ISR 1
199 #endif /* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
200 #include <bsp430/periph/want_.h>
201 #undef BSP430_WANT_CONFIG_HAL_ISR
202 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
203 #undef BSP430_WANT_PERIPH_CPPID
204 #endif /* BSP430_RF_CC110X_GDO0 timer */
205 
206 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID)
207 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID
208 #if 0 == BSP430_RF_CC110X_GDO1_TIMER_CCIDX
209 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
210 #else /* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
211 #define BSP430_WANT_CONFIG_HAL_ISR 1
212 #endif /* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
213 #include <bsp430/periph/want_.h>
214 #undef BSP430_WANT_CONFIG_HAL_ISR
215 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
216 #undef BSP430_WANT_PERIPH_CPPID
217 #endif /* BSP430_RF_CC110X_GDO1 timer */
218 #undef BSP430_WANT_CONFIG_HAL
219 #endif /* configBSP430_RF_ANAREN_CC110L */
220 /* END AUTOMATICALLY GENERATED CODE [emk_config] */
221 /* !BSP430! end=emk_config */
222 
223 /* !BSP430! insert=rfem_config boosterpack=ccem platform=exp430f5529lp mcu=msp430f5529 */
224 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [rfem_config] */
225 #if (configBSP430_RFEM_CCEM - 0)
226 #define BSP430_RFEM_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI5_B0
227 #define configBSP430_SERIAL_ENABLE_SPI 1
228 #define configBSP430_HAL_USCI5_B0 1
229 #define BSP430_RFEM_RF1P3_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
230 #define BSP430_RFEM_RF1P3_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA2
231 #define BSP430_RFEM_RF1P7_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
232 #define BSP430_RFEM_RF1P9_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
233 #define BSP430_RFEM_RF1P10_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
234 #define BSP430_RFEM_RF1P10_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
235 #define BSP430_RFEM_RF1P12_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT6
236 #define BSP430_RFEM_RF1P14_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
237 #define BSP430_RFEM_RF1P16_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
238 #define BSP430_RFEM_RF1P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
239 #define BSP430_RFEM_RF1P20_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
240 #define BSP430_RFEM_RF2P15_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
241 #define BSP430_RFEM_RF2P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT8
242 #define BSP430_RFEM_RF2P19_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
243 #endif /* configBSP430_RFEM_CCEM */
244 /* END AUTOMATICALLY GENERATED CODE [rfem_config] */
245 /* !BSP430! end=rfem_config */
246 
247 #if (configBSP430_PLATFORM_BOOSTERPACK_SHARP96 - 0)
248 /* CS on P6.6, LCD_EN on P1.6, PWR_en on P6.5, SPI on USCI5_B0 */
249 #define configBSP430_HPL_PORT6 1
250 #define configBSP430_HPL_PORT1 1
251 #define configBSP430_HAL_USCI5_B0 1
252 #define configBSP430_SERIAL_ENABLE_SPI 1
253 #endif /* configBSP430_PLATFORM_BOOSTERPACK_SHARP96 */
254 
257 #endif /* BSP430_PLATFORM_EXP430F5529LP_BSP430_CONFIG_H */
Translate functional resource requests to core resource requests.