BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
platform.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 
56 #ifndef BSP430_PLATFORM_EXP430FR5969_PLATFORM_H
57 #define BSP430_PLATFORM_EXP430FR5969_PLATFORM_H
58 
61 #define BSP430_PLATFORM_EXP430FR5969 1
62 
65 /* Available button definitions */
66 #define BSP430_PLATFORM_BUTTON0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
67 #define BSP430_PLATFORM_BUTTON0_PORT_BIT BIT5
68 #define BSP430_PLATFORM_BUTTON1_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
69 #define BSP430_PLATFORM_BUTTON1_PORT_BIT BIT1
70 
71 /* Jumper-controlled red LED on P4.6. Green LED on P1.0 */
72 #define BSP430_LED_RED 0
73 #define BSP430_LED_GREEN 1
74 
75 /* Select FRAM wait states for MSP430FR5969:
76  * zero if <=8 MHz
77  * one if 8 < SYS <= 16
78  * Rated system max frequency is 16MHz, but configurable max is 24MHz
79  * so assume the setting is linear. */
80 #define BSP430_CS_FRAM_NWAITS_FOR_FREQ(freq_) \
81  ((16000000UL < (freq_)) ? 2 : \
82  ((8000000UL < (freq_)) ? 1 : \
83  0))
84 
85 /* How to use ACLK as a capture/compare input source */
86 /* Settings for TA1: T1A2 ccis=1 ; clk P1.1 ; cc0 P1.7 ; cc1 P1.2 */
87 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIDX
88 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
89 #define BSP430_TIMER_CCACLK_ACLK_CCIDX 2
90 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIDX */
91 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIS
92 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
93 #define BSP430_TIMER_CCACLK_ACLK_CCIS CCIS_1
94 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIS */
95 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_BIT
96 /* NB: Check against BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID in bsp430_config.h */
97 #define BSP430_TIMER_CCACLK_CLK_PORT_BIT BIT1
98 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_BIT */
99 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_BIT
100 /* NB: Check against BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID in bsp430_config.h */
101 #define BSP430_TIMER_CCACLK_CC0_PORT_BIT BIT7
102 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_BIT */
103 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_BIT
104 /* NB: Check against BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID in bsp430_config.h */
105 #define BSP430_TIMER_CCACLK_CC1_PORT_BIT BIT2
106 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_BIT */
107 
108 /* !BSP430! insert=emk_platform boosterpack=cc3000boost platform=exp430fr5969 mcu=msp430fr5969 spi=UCB0SOMI tag=cc3000 hal=CSn gpio=IRQn */
109 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_platform] */
110 #if (configBSP430_RF_CC3000BOOST - 0)
111 #define BSP430_RF_CC3000 1
112 #define BSP430_RF_CC3000_SPI_PERIPH_HANDLE BSP430_PERIPH_EUSCI_B0
113 #define BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
114 #define BSP430_RF_CC3000_PWR_EN_PORT_BIT BIT2
115 #define BSP430_RF_CC3000_SCLK_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
116 #define BSP430_RF_CC3000_SCLK_PORT_BIT BIT2
117 #define BSP430_RF_CC3000_IRQn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
118 #define BSP430_RF_CC3000_IRQn_PORT_BIT BIT2
119 #define BSP430_RF_CC3000_IRQn_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA1
120 #define BSP430_RF_CC3000_IRQn_TIMER_CCIDX 1
121 #define BSP430_RF_CC3000_IRQn_TIMER_CCIS CCIS_0
122 #define BSP430_RF_CC3000_CSn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
123 #define BSP430_RF_CC3000_CSn_PORT_BIT BIT0
124 #define BSP430_RF_CC3000_MOSI_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
125 #define BSP430_RF_CC3000_MOSI_PORT_BIT BIT6
126 #define BSP430_RF_CC3000_MISO_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
127 #define BSP430_RF_CC3000_MISO_PORT_BIT BIT7
128 #endif /* configBSP430_RF_CC3000BOOST */
129 /* END AUTOMATICALLY GENERATED CODE [emk_platform] */
130 /* !BSP430! end=emk_platform */
131 
132 /* !BSP430! insert=emk_platform boosterpack=anaren_cc110l platform=exp430fr5969 mcu=msp430fr5969 spi=UCB0SOMI tag=cc110x hal=CSn gpio=GDO0,GDO1,GDO2 */
133 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_platform] */
134 #if (configBSP430_RF_ANAREN_CC110L - 0)
135 #define BSP430_RF_CC110X 1
136 #define BSP430_RF_CC110X_SPI_PERIPH_HANDLE BSP430_PERIPH_EUSCI_B0
137 #define BSP430_RF_CC110X_GDO2_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
138 #define BSP430_RF_CC110X_GDO2_PORT_BIT BIT2
139 #define BSP430_RF_CC110X_GDO0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
140 #define BSP430_RF_CC110X_GDO0_PORT_BIT BIT2
141 #define BSP430_RF_CC110X_GDO0_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA1
142 #define BSP430_RF_CC110X_GDO0_TIMER_CCIDX 1
143 #define BSP430_RF_CC110X_GDO0_TIMER_CCIS CCIS_0
144 #define BSP430_RF_CC110X_CSn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
145 #define BSP430_RF_CC110X_CSn_PORT_BIT BIT0
146 #define BSP430_RF_CC110X_GDO1_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
147 #define BSP430_RF_CC110X_GDO1_PORT_BIT BIT7
148 #define BSP430_RF_CC110X_GDO1_TIMER_PERIPH_HANDLE BSP430_PERIPH_TB0
149 #define BSP430_RF_CC110X_GDO1_TIMER_CCIDX 4
150 #define BSP430_RF_CC110X_GDO1_TIMER_CCIS CCIS_1
151 #endif /* configBSP430_RF_ANAREN_CC110L */
152 /* END AUTOMATICALLY GENERATED CODE [emk_platform] */
153 /* !BSP430! end=emk_platform */
154 
155 /* !BSP430! insert=rfem_platform boosterpack=ccem platform=exp430fr5969 mcu=msp430fr5969 */
156 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [rfem_platform] */
157 #if (configBSP430_RFEM_CCEM - 0)
158 #define BSP430_RFEM_CCEM 1
159 #define BSP430_RFEM 1
160 #endif /* configBSP430_RFEM_CCEM */
161 #if (BSP430_RFEM_CCEM - 0)
162 #define BSP430_RFEM_SERIAL_PERIPH_HANDLE BSP430_PERIPH_EUSCI_B0
163 #define BSP430_RFEM_RF1P3_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
164 #define BSP430_RFEM_RF1P3_PORT_BIT BIT4
165 #define BSP430_RFEM_RF1P3_TIMER_PERIPH_HANDLE BSP430_PERIPH_TB0
166 #define BSP430_RFEM_RF1P3_TIMER_CCIDX 1
167 #define BSP430_RFEM_RF1P3_TIMER_CCIS CCIS_0
168 #define BSP430_RFEM_RF1P7_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
169 #define BSP430_RFEM_RF1P7_PORT_BIT BIT5
170 #define BSP430_RFEM_RF1P7_TIMER_PERIPH_HANDLE BSP430_PERIPH_TB0
171 #define BSP430_RFEM_RF1P7_TIMER_CCIDX 0
172 #define BSP430_RFEM_RF1P7_TIMER_CCIS CCIS_1
173 #define BSP430_RFEM_RF1P9_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
174 #define BSP430_RFEM_RF1P9_PORT_BIT BIT6
175 #define BSP430_RFEM_RF1P10_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
176 #define BSP430_RFEM_RF1P10_PORT_BIT BIT2
177 #define BSP430_RFEM_RF1P10_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA1
178 #define BSP430_RFEM_RF1P10_TIMER_CCIDX 1
179 #define BSP430_RFEM_RF1P10_TIMER_CCIS CCIS_0
180 #define BSP430_RFEM_RF1P12_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
181 #define BSP430_RFEM_RF1P12_PORT_BIT BIT2
182 #define BSP430_RFEM_RF1P14_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
183 #define BSP430_RFEM_RF1P14_PORT_BIT BIT0
184 #define BSP430_RFEM_RF1P16_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
185 #define BSP430_RFEM_RF1P16_PORT_BIT BIT2
186 #define BSP430_RFEM_RF1P18_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
187 #define BSP430_RFEM_RF1P18_PORT_BIT BIT6
188 #define BSP430_RFEM_RF1P18_TIMER_PERIPH_HANDLE BSP430_PERIPH_TB0
189 #define BSP430_RFEM_RF1P18_TIMER_CCIDX 3
190 #define BSP430_RFEM_RF1P18_TIMER_CCIS CCIS_1
191 #define BSP430_RFEM_RF1P20_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
192 #define BSP430_RFEM_RF1P20_PORT_BIT BIT7
193 #define BSP430_RFEM_RF1P20_TIMER_PERIPH_HANDLE BSP430_PERIPH_TB0
194 #define BSP430_RFEM_RF1P20_TIMER_CCIDX 4
195 #define BSP430_RFEM_RF1P20_TIMER_CCIS CCIS_1
196 #define BSP430_RFEM_RF2P15_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
197 #define BSP430_RFEM_RF2P15_PORT_BIT BIT5
198 #define BSP430_RFEM_RF2P15_TIMER_PERIPH_HANDLE BSP430_PERIPH_TB0
199 #define BSP430_RFEM_RF2P15_TIMER_CCIDX 2
200 #define BSP430_RFEM_RF2P15_TIMER_CCIS CCIS_0
201 #define BSP430_RFEM_RF2P18_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
202 #define BSP430_RFEM_RF2P18_PORT_BIT BIT3
203 #define BSP430_RFEM_RF2P18_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA1
204 #define BSP430_RFEM_RF2P18_TIMER_CCIDX 2
205 #define BSP430_RFEM_RF2P18_TIMER_CCIS CCIS_0
206 #define BSP430_RFEM_RF2P19_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
207 #define BSP430_RFEM_RF2P19_PORT_BIT BIT6
208 #define BSP430_RFEM_RF2P19_TIMER_PERIPH_HANDLE BSP430_PERIPH_TB0
209 #define BSP430_RFEM_RF2P19_TIMER_CCIDX 5
210 #define BSP430_RFEM_RF2P19_TIMER_CCIS CCIS_0
211 #endif /* BSP430_RFEM_CCEM */
212 /* END AUTOMATICALLY GENERATED CODE [rfem_platform] */
213 /* !BSP430! end=rfem_platform */
214 
215 #if (configBSP430_PLATFORM_BOOSTERPACK_SHARP96 - 0)
216 /* CS on P2.4, LCD_EN on P4.3, PWR_en on P4.2, SPI on EUSCI_B0 */
217 #define BSP430_PLATFORM_SHARPLCD_CS_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
218 #define BSP430_PLATFORM_SHARPLCD_CS_PORT_BIT BIT4
219 #define BSP430_PLATFORM_SHARPLCD_LCD_EN_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
220 #define BSP430_PLATFORM_SHARPLCD_LCD_EN_PORT_BIT BIT3
221 #define BSP430_PLATFORM_SHARPLCD_PWR_EN_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
222 #define BSP430_PLATFORM_SHARPLCD_PWR_EN_PORT_BIT BIT2
223 #define BSP430_PLATFORM_SHARPLCD_SPI_PERIPH_HANDLE BSP430_PERIPH_EUSCI_B0
224 #endif /* configBSP430_PLATFORM_BOOSTERPACK_SHARP96 */
225 
228 /* Include generic file, in case this is being included directly */
229 #include <bsp430/platform.h>
230 
231 #endif /* BSP430_PLATFORM_EXP430FR5969_H */
Entrypoint for platform-specific capabilities.