Rev 8 | Rev 28 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | /** |
2 | ****************************************************************************** |
||
3 | * @file stm32l1xx_it.c |
||
4 | * @brief Interrupt Service Routines. |
||
5 | ****************************************************************************** |
||
6 | * |
||
18 | mjames | 7 | * COPYRIGHT(c) 2017 STMicroelectronics |
2 | mjames | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without modification, |
||
10 | * are permitted provided that the following conditions are met: |
||
11 | * 1. Redistributions of source code must retain the above copyright notice, |
||
12 | * this list of conditions and the following disclaimer. |
||
13 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
||
14 | * this list of conditions and the following disclaimer in the documentation |
||
15 | * and/or other materials provided with the distribution. |
||
16 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
||
17 | * may be used to endorse or promote products derived from this software |
||
18 | * without specific prior written permission. |
||
19 | * |
||
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
||
21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
||
22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||
23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
||
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
||
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
||
26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
||
27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
||
28 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||
29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
30 | * |
||
31 | ****************************************************************************** |
||
32 | */ |
||
33 | /* Includes ------------------------------------------------------------------*/ |
||
34 | #include "stm32l1xx_hal.h" |
||
35 | #include "stm32l1xx.h" |
||
36 | #include "stm32l1xx_it.h" |
||
37 | |||
38 | /* USER CODE BEGIN 0 */ |
||
39 | |||
40 | /* USER CODE END 0 */ |
||
41 | |||
42 | /* External variables --------------------------------------------------------*/ |
||
6 | mjames | 43 | extern DMA_HandleTypeDef hdma_adc; |
2 | mjames | 44 | |
45 | /******************************************************************************/ |
||
46 | /* Cortex-M3 Processor Interruption and Exception Handlers */ |
||
47 | /******************************************************************************/ |
||
48 | |||
49 | /** |
||
50 | * @brief This function handles Non maskable interrupt. |
||
51 | */ |
||
52 | void NMI_Handler(void) |
||
53 | { |
||
54 | /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ |
||
55 | |||
56 | /* USER CODE END NonMaskableInt_IRQn 0 */ |
||
57 | /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ |
||
58 | |||
59 | /* USER CODE END NonMaskableInt_IRQn 1 */ |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @brief This function handles Hard fault interrupt. |
||
64 | */ |
||
65 | void HardFault_Handler(void) |
||
66 | { |
||
67 | /* USER CODE BEGIN HardFault_IRQn 0 */ |
||
68 | |||
69 | /* USER CODE END HardFault_IRQn 0 */ |
||
70 | while (1) |
||
71 | { |
||
72 | } |
||
73 | /* USER CODE BEGIN HardFault_IRQn 1 */ |
||
74 | |||
75 | /* USER CODE END HardFault_IRQn 1 */ |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @brief This function handles Memory management fault. |
||
80 | */ |
||
81 | void MemManage_Handler(void) |
||
82 | { |
||
83 | /* USER CODE BEGIN MemoryManagement_IRQn 0 */ |
||
84 | |||
85 | /* USER CODE END MemoryManagement_IRQn 0 */ |
||
86 | while (1) |
||
87 | { |
||
88 | } |
||
89 | /* USER CODE BEGIN MemoryManagement_IRQn 1 */ |
||
90 | |||
91 | /* USER CODE END MemoryManagement_IRQn 1 */ |
||
92 | } |
||
93 | |||
94 | /** |
||
95 | * @brief This function handles Pre-fetch fault, memory access fault. |
||
96 | */ |
||
97 | void BusFault_Handler(void) |
||
98 | { |
||
99 | /* USER CODE BEGIN BusFault_IRQn 0 */ |
||
100 | |||
101 | /* USER CODE END BusFault_IRQn 0 */ |
||
102 | while (1) |
||
103 | { |
||
104 | } |
||
105 | /* USER CODE BEGIN BusFault_IRQn 1 */ |
||
106 | |||
107 | /* USER CODE END BusFault_IRQn 1 */ |
||
108 | } |
||
109 | |||
110 | /** |
||
111 | * @brief This function handles Undefined instruction or illegal state. |
||
112 | */ |
||
113 | void UsageFault_Handler(void) |
||
114 | { |
||
115 | /* USER CODE BEGIN UsageFault_IRQn 0 */ |
||
116 | |||
117 | /* USER CODE END UsageFault_IRQn 0 */ |
||
118 | while (1) |
||
119 | { |
||
120 | } |
||
121 | /* USER CODE BEGIN UsageFault_IRQn 1 */ |
||
122 | |||
123 | /* USER CODE END UsageFault_IRQn 1 */ |
||
124 | } |
||
125 | |||
126 | /** |
||
127 | * @brief This function handles System service call via SWI instruction. |
||
128 | */ |
||
129 | void SVC_Handler(void) |
||
130 | { |
||
131 | /* USER CODE BEGIN SVC_IRQn 0 */ |
||
132 | |||
133 | /* USER CODE END SVC_IRQn 0 */ |
||
134 | /* USER CODE BEGIN SVC_IRQn 1 */ |
||
135 | |||
136 | /* USER CODE END SVC_IRQn 1 */ |
||
137 | } |
||
138 | |||
139 | /** |
||
140 | * @brief This function handles Debug monitor. |
||
141 | */ |
||
142 | void DebugMon_Handler(void) |
||
143 | { |
||
144 | /* USER CODE BEGIN DebugMonitor_IRQn 0 */ |
||
145 | |||
146 | /* USER CODE END DebugMonitor_IRQn 0 */ |
||
147 | /* USER CODE BEGIN DebugMonitor_IRQn 1 */ |
||
148 | |||
149 | /* USER CODE END DebugMonitor_IRQn 1 */ |
||
150 | } |
||
151 | |||
152 | /** |
||
153 | * @brief This function handles Pendable request for system service. |
||
154 | */ |
||
155 | void PendSV_Handler(void) |
||
156 | { |
||
157 | /* USER CODE BEGIN PendSV_IRQn 0 */ |
||
158 | |||
159 | /* USER CODE END PendSV_IRQn 0 */ |
||
160 | /* USER CODE BEGIN PendSV_IRQn 1 */ |
||
161 | |||
162 | /* USER CODE END PendSV_IRQn 1 */ |
||
163 | } |
||
164 | |||
165 | /** |
||
166 | * @brief This function handles System tick timer. |
||
167 | */ |
||
168 | void SysTick_Handler(void) |
||
169 | { |
||
170 | /* USER CODE BEGIN SysTick_IRQn 0 */ |
||
171 | |||
172 | /* USER CODE END SysTick_IRQn 0 */ |
||
173 | HAL_IncTick(); |
||
174 | HAL_SYSTICK_IRQHandler(); |
||
175 | /* USER CODE BEGIN SysTick_IRQn 1 */ |
||
176 | |||
177 | /* USER CODE END SysTick_IRQn 1 */ |
||
178 | } |
||
179 | |||
180 | /******************************************************************************/ |
||
181 | /* STM32L1xx Peripheral Interrupt Handlers */ |
||
182 | /* Add here the Interrupt Handlers for the used peripherals. */ |
||
183 | /* For the available peripheral interrupt handler names, */ |
||
184 | /* please refer to the startup file (startup_stm32l1xx.s). */ |
||
185 | /******************************************************************************/ |
||
186 | |||
6 | mjames | 187 | /** |
188 | * @brief This function handles DMA1 channel1 global interrupt. |
||
189 | */ |
||
190 | void DMA1_Channel1_IRQHandler(void) |
||
191 | { |
||
192 | /* USER CODE BEGIN DMA1_Channel1_IRQn 0 */ |
||
193 | |||
194 | /* USER CODE END DMA1_Channel1_IRQn 0 */ |
||
195 | HAL_DMA_IRQHandler(&hdma_adc); |
||
196 | /* USER CODE BEGIN DMA1_Channel1_IRQn 1 */ |
||
197 | |||
198 | /* USER CODE END DMA1_Channel1_IRQn 1 */ |
||
199 | } |
||
200 | |||
2 | mjames | 201 | /* USER CODE BEGIN 1 */ |
202 | |||
203 | /* USER CODE END 1 */ |
||
204 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |