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_EXP430FR4133_BSP430_CONFIG_H
40 #define BSP430_PLATFORM_EXP430FR4133_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 EUSCI_A0 UART as the console. */
50 #if (configBSP430_CONSOLE - 0)
51 #ifndef BSP430_CONSOLE_SERIAL_PERIPH_CPPID
52 #define BSP430_CONSOLE_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_EUSCI_A0
53 #endif /* BSP430_CONSOLE_SERIAL_PERIPH_CPPID */
54 #endif /* configBSP430_CONSOLE */
55 
56 /* Enable buttons as requested */
57 #if (configBSP430_PLATFORM_BUTTON0 - 0)
58 #if !defined(configBSP430_HAL_PORT1)
59 #define configBSP430_HAL_PORT1 1
60 #else /* configBSP430_HAL_PORT1 */
61 #if (configBSP430_PLATFORM_BUTTON0 - 0) && ! defined(configBSP430_HPL_PORT1)
62 #define configBSP430_HPL_PORT1 1
63 #endif /* BUTTON0 */
64 #endif /* configBSP430_HAL_PORT1 */
65 #endif /* configBSP430_PLATFORM_BUTTON0 */
66 
67 #if (configBSP430_PLATFORM_BUTTON1 - 0)
68 #if !defined(configBSP430_HAL_PORT2)
69 #define configBSP430_HAL_PORT2 1
70 #else /* configBSP430_HAL_PORT2 */
71 #if (configBSP430_PLATFORM_BUTTON1 - 0) && ! defined(configBSP430_HPL_PORT2)
72 #define configBSP430_HPL_PORT2 1
73 #endif /* BUTTON1 */
74 #endif /* configBSP430_HAL_PORT2 */
75 #endif /* configBSP430_PLATFORM_BUTTON1 */
76 
77 /* No timer peripheral on the MSP430FR4133 supports ACLK captures. */
78 
79 /* !BSP430! insert=emk_config boosterpack=cc3000boost platform=exp430fr4133 mcu=msp430fr4133 spi=UCB0SOMI tag=cc3000 hal=CSn gpio=IRQn */
80 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_config] */
81 #if (configBSP430_RF_CC3000BOOST - 0)
82 #define BSP430_RF_CC3000_SPI_PERIPH_CPPID BSP430_PERIPH_CPPID_EUSCI_B0
83 #define configBSP430_SERIAL_ENABLE_SPI 1
84 #define configBSP430_HAL_EUSCI_B0 1
85 #define BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT8
86 #define BSP430_RF_CC3000_SCLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT5
87 #define BSP430_RF_CC3000_IRQn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
88 #define BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
89 #define BSP430_RF_CC3000_CSn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
90 #define BSP430_RF_CC3000_MOSI_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT5
91 #define BSP430_RF_CC3000_MISO_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT5
92 /* Request HAL (and HPL) for all GPIO and HAL-enabled ports */
93 #define BSP430_WANT_CONFIG_HAL 1
94 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_IRQn_PORT_PERIPH_CPPID
95 #include <bsp430/periph/want_.h>
96 #undef BSP430_WANT_PERIPH_CPPID
97 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_CSn_PORT_PERIPH_CPPID
98 #include <bsp430/periph/want_.h>
99 #undef BSP430_WANT_PERIPH_CPPID
100 #undef BSP430_WANT_CONFIG_HAL
101 /* Request HPL for all non-GPIO ports */
102 #define BSP430_WANT_CONFIG_HPL 1
103 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_CPPID
104 #include <bsp430/periph/want_.h>
105 #undef BSP430_WANT_PERIPH_CPPID
106 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_SCLK_PORT_PERIPH_CPPID
107 #include <bsp430/periph/want_.h>
108 #undef BSP430_WANT_PERIPH_CPPID
109 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_MOSI_PORT_PERIPH_CPPID
110 #include <bsp430/periph/want_.h>
111 #undef BSP430_WANT_PERIPH_CPPID
112 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_MISO_PORT_PERIPH_CPPID
113 #include <bsp430/periph/want_.h>
114 #undef BSP430_WANT_PERIPH_CPPID
115 #undef BSP430_WANT_CONFIG_HPL
116 /* Request HAL for GPIO timers */
117 #define BSP430_WANT_CONFIG_HAL 1
118 
119 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID)
120 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID
121 #if 0 == BSP430_RF_CC3000_IRQn_TIMER_CCIDX
122 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
123 #else /* BSP430_RF_CC3000_IRQn_TIMER_CCIDX */
124 #define BSP430_WANT_CONFIG_HAL_ISR 1
125 #endif /* BSP430_RF_CC3000_IRQn_TIMER_CCIDX */
126 #include <bsp430/periph/want_.h>
127 #undef BSP430_WANT_CONFIG_HAL_ISR
128 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
129 #undef BSP430_WANT_PERIPH_CPPID
130 #endif /* BSP430_RF_CC3000_IRQn timer */
131 #undef BSP430_WANT_CONFIG_HAL
132 #endif /* configBSP430_RF_CC3000BOOST */
133 /* END AUTOMATICALLY GENERATED CODE [emk_config] */
134 /* !BSP430! end=emk_config */
135 
136 /* !BSP430! insert=emk_config boosterpack=anaren_cc110l platform=exp430fr4133 mcu=msp430fr4133 spi=UCB0SOMI tag=cc110x hal=CSn gpio=GDO0,GDO1,GDO2 */
137 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_config] */
138 #if (configBSP430_RF_ANAREN_CC110L - 0)
139 #define BSP430_RF_CC110X_SPI_PERIPH_CPPID BSP430_PERIPH_CPPID_EUSCI_B0
140 #define configBSP430_SERIAL_ENABLE_SPI 1
141 #define configBSP430_HAL_EUSCI_B0 1
142 #define BSP430_RF_CC110X_GDO2_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT8
143 #define BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
144 #define BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
145 #define BSP430_RF_CC110X_CSn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
146 #define BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT5
147 /* Request HAL (and HPL) for all GPIO and HAL-enabled ports */
148 #define BSP430_WANT_CONFIG_HAL 1
149 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO2_PORT_PERIPH_CPPID
150 #include <bsp430/periph/want_.h>
151 #undef BSP430_WANT_PERIPH_CPPID
152 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID
153 #include <bsp430/periph/want_.h>
154 #undef BSP430_WANT_PERIPH_CPPID
155 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_CSn_PORT_PERIPH_CPPID
156 #include <bsp430/periph/want_.h>
157 #undef BSP430_WANT_PERIPH_CPPID
158 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID
159 #include <bsp430/periph/want_.h>
160 #undef BSP430_WANT_PERIPH_CPPID
161 #undef BSP430_WANT_CONFIG_HAL
162 /* Request HAL for GPIO timers */
163 #define BSP430_WANT_CONFIG_HAL 1
164 
165 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID)
166 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID
167 #if 0 == BSP430_RF_CC110X_GDO2_TIMER_CCIDX
168 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
169 #else /* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
170 #define BSP430_WANT_CONFIG_HAL_ISR 1
171 #endif /* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
172 #include <bsp430/periph/want_.h>
173 #undef BSP430_WANT_CONFIG_HAL_ISR
174 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
175 #undef BSP430_WANT_PERIPH_CPPID
176 #endif /* BSP430_RF_CC110X_GDO2 timer */
177 
178 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID)
179 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID
180 #if 0 == BSP430_RF_CC110X_GDO0_TIMER_CCIDX
181 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
182 #else /* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
183 #define BSP430_WANT_CONFIG_HAL_ISR 1
184 #endif /* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
185 #include <bsp430/periph/want_.h>
186 #undef BSP430_WANT_CONFIG_HAL_ISR
187 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
188 #undef BSP430_WANT_PERIPH_CPPID
189 #endif /* BSP430_RF_CC110X_GDO0 timer */
190 
191 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID)
192 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID
193 #if 0 == BSP430_RF_CC110X_GDO1_TIMER_CCIDX
194 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
195 #else /* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
196 #define BSP430_WANT_CONFIG_HAL_ISR 1
197 #endif /* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
198 #include <bsp430/periph/want_.h>
199 #undef BSP430_WANT_CONFIG_HAL_ISR
200 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
201 #undef BSP430_WANT_PERIPH_CPPID
202 #endif /* BSP430_RF_CC110X_GDO1 timer */
203 #undef BSP430_WANT_CONFIG_HAL
204 #endif /* configBSP430_RF_ANAREN_CC110L */
205 /* END AUTOMATICALLY GENERATED CODE [emk_config] */
206 /* !BSP430! end=emk_config */
207 
208 /* !BSP430! insert=rfem_config boosterpack=ccem platform=exp430fr4133 mcu=msp430fr4133 */
209 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [rfem_config] */
210 #if (configBSP430_RFEM_CCEM - 0)
211 #define BSP430_RFEM_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_EUSCI_B0
212 #define configBSP430_SERIAL_ENABLE_SPI 1
213 #define configBSP430_HAL_EUSCI_B0 1
214 #define BSP430_RFEM_RF1P3_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
215 #define BSP430_RFEM_RF1P7_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
216 #define BSP430_RFEM_RF1P9_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
217 #define BSP430_RFEM_RF1P10_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
218 #define BSP430_RFEM_RF1P10_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
219 #define BSP430_RFEM_RF1P12_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT8
220 #define BSP430_RFEM_RF1P14_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
221 #define BSP430_RFEM_RF1P14_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
222 #define BSP430_RFEM_RF1P16_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT5
223 #define BSP430_RFEM_RF1P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT5
224 #define BSP430_RFEM_RF1P20_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT5
225 #define BSP430_RFEM_RF2P15_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
226 #define BSP430_RFEM_RF2P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
227 #define BSP430_RFEM_RF2P19_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT8
228 #define BSP430_RFEM_RF2P19_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
229 #endif /* configBSP430_RFEM_CCEM */
230 /* END AUTOMATICALLY GENERATED CODE [rfem_config] */
231 /* !BSP430! end=rfem_config */
232 
233 #if (configBSP430_PLATFORM_BOOSTERPACK_SHARP96 - 0)
234 /* CS on P2.4, LCD_EN on P4.3, PWR_en on P4.2, SPI on EUSCI_B0 */
235 #define configBSP430_HPL_PORT2 1
236 #define configBSP430_HPL_PORT4 1
237 #define configBSP430_HAL_EUSCI_B0 1
238 #define configBSP430_SERIAL_ENABLE_SPI 1
239 #endif /* configBSP430_PLATFORM_BOOSTERPACK_SHARP96 */
240 
243 #endif /* BSP430_PLATFORM_EXP430FR4133_BSP430_CONFIG_H */
Translate functional resource requests to core resource requests.