2 * -------------------------------------------
\r
3 * MSP432 DriverLib - v3_10_00_09
\r
4 * -------------------------------------------
\r
6 * --COPYRIGHT--,BSD,BSD
\r
7 * Copyright (c) 2014, Texas Instruments Incorporated
\r
8 * All rights reserved.
\r
10 * Redistribution and use in source and binary forms, with or without
\r
11 * modification, are permitted provided that the following conditions
\r
14 * * Redistributions of source code must retain the above copyright
\r
15 * notice, this list of conditions and the following disclaimer.
\r
17 * * Redistributions in binary form must reproduce the above copyright
\r
18 * notice, this list of conditions and the following disclaimer in the
\r
19 * documentation and/or other materials provided with the distribution.
\r
21 * * Neither the name of Texas Instruments Incorporated nor the names of
\r
22 * its contributors may be used to endorse or promote products derived
\r
23 * from this software without specific prior written permission.
\r
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
\r
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
\r
27 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
\r
28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
\r
29 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
\r
30 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
\r
31 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
\r
32 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
\r
33 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
\r
34 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
\r
35 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
37 //*****************************************************************************
\r
39 // Copyright (C) 2012 - 2015 Texas Instruments Incorporated - http://www.ti.com/
\r
41 // Redistribution and use in source and binary forms, with or without
\r
42 // modification, are permitted provided that the following conditions
\r
45 // Redistributions of source code must retain the above copyright
\r
46 // notice, this list of conditions and the following disclaimer.
\r
48 // Redistributions in binary form must reproduce the above copyright
\r
49 // notice, this list of conditions and the following disclaimer in the
\r
50 // documentation and/or other materials provided with the
\r
53 // Neither the name of Texas Instruments Incorporated nor the names of
\r
54 // its contributors may be used to endorse or promote products derived
\r
55 // from this software without specific prior written permission.
\r
57 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
\r
58 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
\r
59 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
\r
60 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
\r
61 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
\r
62 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
\r
63 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
\r
64 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
\r
65 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
66 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
\r
67 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
69 // MSP432 Startup Code for IAR Embedded Workbench for ARM
\r
71 //****************************************************************************
\r
75 //*****************************************************************************
\r
77 // Enable the IAR extensions for this source file.
\r
79 //*****************************************************************************
\r
80 #pragma language=extended
\r
82 //*****************************************************************************
\r
84 // Forward declaration of the default fault handlers.
\r
86 //*****************************************************************************
\r
87 void ResetISR(void);
\r
88 static void NmiSR(void);
\r
89 static void FaultISR(void);
\r
90 static void IntDefaultHandler(void);
\r
92 //*****************************************************************************
\r
94 // External declaration for the interrupt handler used by the application.
\r
96 //*****************************************************************************
\r
97 extern void SysTick_Handler( void );
\r
98 extern void PendSV_Handler( void );
\r
99 extern void SVC_Handler( void );
\r
100 extern void vUART_Handler( void );
\r
101 extern void vT32_0_Handler( void );
\r
102 extern void vT32_1_Handler( void );
\r
103 //*****************************************************************************
\r
105 // The entry point for the application startup code.
\r
107 //*****************************************************************************
\r
108 extern void __iar_program_start(void);
\r
110 //*****************************************************************************
\r
112 // Reserve space for the system stack.
\r
114 //*****************************************************************************
\r
115 static uint32_t systemStack[128] @ ".noinit";
\r
117 //*****************************************************************************
\r
119 // A union that describes the entries of the vector table. The union is needed
\r
120 // since the first entry is the stack pointer and the remainder are function
\r
123 //*****************************************************************************
\r
126 void (*handler)(void);
\r
131 //*****************************************************************************
\r
133 // The vector table. Note that the proper constructs must be placed on this to
\r
134 // ensure that it ends up at physical address 0x0000.0000.
\r
136 //*****************************************************************************
\r
137 __root const uVectorEntry __vector_table[] @ ".intvec" =
\r
139 { .ptr = (uint32_t)systemStack + sizeof(systemStack) },
\r
140 // The initial stack pointer
\r
141 ResetISR, // The reset handler
\r
142 NmiSR, // The NMI handler
\r
143 FaultISR, // The hard fault handler
\r
144 IntDefaultHandler, // The MPU fault handler
\r
145 IntDefaultHandler, // The bus fault handler
\r
146 IntDefaultHandler, // The usage fault handler
\r
151 SVC_Handler, // SVCall handler
\r
152 IntDefaultHandler, // Debug monitor handler
\r
154 PendSV_Handler, // The PendSV handler
\r
155 SysTick_Handler, // The SysTick handler
\r
156 IntDefaultHandler, // PSS ISR
\r
157 IntDefaultHandler, // CS ISR
\r
158 IntDefaultHandler, // PCM ISR
\r
159 IntDefaultHandler, // WDT ISR
\r
160 IntDefaultHandler, // FPU ISR
\r
161 IntDefaultHandler, // FLCTL ISR
\r
162 IntDefaultHandler, // COMP_E0_MODULE ISR
\r
163 IntDefaultHandler, // COMP_E1_MODULE ISR
\r
164 IntDefaultHandler, // TA0_0 ISR
\r
165 IntDefaultHandler, // TA0_N ISR
\r
166 IntDefaultHandler, // TA1_0 ISR
\r
167 IntDefaultHandler, // TA1_N ISR
\r
168 IntDefaultHandler, // TA2_0 ISR
\r
169 IntDefaultHandler, // TA2_N ISR
\r
170 IntDefaultHandler, // TA3_0 ISR
\r
171 IntDefaultHandler, // TA3_N ISR
\r
172 vUART_Handler, // EUSCIA0 ISR
\r
173 IntDefaultHandler, // EUSCIA1 ISR
\r
174 IntDefaultHandler, // EUSCIA2 ISR
\r
175 IntDefaultHandler, // EUSCIA3 ISR
\r
176 IntDefaultHandler, // EUSCIB0 ISR
\r
177 IntDefaultHandler, // EUSCIB1 ISR
\r
178 IntDefaultHandler, // EUSCIB2 ISR
\r
179 IntDefaultHandler, // EUSCIB3 ISR
\r
180 IntDefaultHandler, // ADC12 ISR
\r
181 vT32_0_Handler, // T32_INT1 ISR
\r
182 vT32_1_Handler, // T32_INT2 ISR
\r
183 IntDefaultHandler, // T32_INTC ISR
\r
184 IntDefaultHandler, // AES ISR
\r
185 IntDefaultHandler, // RTC ISR
\r
186 IntDefaultHandler, // DMA_ERR ISR
\r
187 IntDefaultHandler, // DMA_INT3 ISR
\r
188 IntDefaultHandler, // DMA_INT2 ISR
\r
189 IntDefaultHandler, // DMA_INT1 ISR
\r
190 IntDefaultHandler, // DMA_INT0 ISR
\r
191 IntDefaultHandler, // PORT1 ISR
\r
192 IntDefaultHandler, // PORT2 ISR
\r
193 IntDefaultHandler, // PORT3 ISR
\r
194 IntDefaultHandler, // PORT4 ISR
\r
195 IntDefaultHandler, // PORT5 ISR
\r
196 IntDefaultHandler, // PORT6 ISR
\r
197 IntDefaultHandler, // Reserved 41
\r
198 IntDefaultHandler, // Reserved 42
\r
199 IntDefaultHandler, // Reserved 43
\r
200 IntDefaultHandler, // Reserved 44
\r
201 IntDefaultHandler, // Reserved 45
\r
202 IntDefaultHandler, // Reserved 46
\r
203 IntDefaultHandler, // Reserved 47
\r
204 IntDefaultHandler, // Reserved 48
\r
205 IntDefaultHandler, // Reserved 49
\r
206 IntDefaultHandler, // Reserved 50
\r
207 IntDefaultHandler, // Reserved 51
\r
208 IntDefaultHandler, // Reserved 52
\r
209 IntDefaultHandler, // Reserved 53
\r
210 IntDefaultHandler, // Reserved 54
\r
211 IntDefaultHandler, // Reserved 55
\r
212 IntDefaultHandler, // Reserved 56
\r
213 IntDefaultHandler, // Reserved 57
\r
214 IntDefaultHandler, // Reserved 58
\r
215 IntDefaultHandler, // Reserved 59
\r
216 IntDefaultHandler, // Reserved 60
\r
217 IntDefaultHandler, // Reserved 61
\r
218 IntDefaultHandler, // Reserved 62
\r
219 IntDefaultHandler, // Reserved 63
\r
220 IntDefaultHandler // Reserved 64
\r
223 //*****************************************************************************
\r
225 // This is the code that gets called when the processor first starts execution
\r
226 // following a reset event. Only the absolutely necessary set is performed,
\r
227 // after which the application supplied entry() routine is called. Any fancy
\r
228 // actions (such as making decisions based on the reset cause register, and
\r
229 // resetting the bits in that register) are left solely in the hands of the
\r
232 //*****************************************************************************
\r
236 void SystemInit(void);
\r
238 // Initialize the device
\r
242 // Call the application's entry point.
\r
244 __iar_program_start();
\r
247 //*****************************************************************************
\r
249 // This is the code that gets called when the processor receives a NMI. This
\r
250 // simply enters an infinite loop, preserving the system state for examination
\r
253 //*****************************************************************************
\r
258 // Enter an infinite loop.
\r
265 //*****************************************************************************
\r
267 // This is the code that gets called when the processor receives a fault
\r
268 // interrupt. This simply enters an infinite loop, preserving the system state
\r
269 // for examination by a debugger.
\r
271 //*****************************************************************************
\r
276 // Enter an infinite loop.
\r
283 //*****************************************************************************
\r
285 // This is the code that gets called when the processor receives an unexpected
\r
286 // interrupt. This simply enters an infinite loop, preserving the system state
\r
287 // for examination by a debugger.
\r
289 //*****************************************************************************
\r
291 IntDefaultHandler(void)
\r
294 // Go into an infinite loop.
\r