38
|
1 /**
|
|
2 ******************************************************************************
|
|
3 * @file GPIO/GPIO_IOToggle/Src/stm32f4xx_it.c
|
|
4 * @author MCD Application Team
|
|
5 * @version V1.1.0
|
|
6 * @date 26-June-2014
|
|
7 * @brief Main Interrupt Service Routines.
|
|
8 * This file provides template for all exceptions handler and
|
|
9 * peripherals interrupt service routine.
|
|
10 ******************************************************************************
|
|
11 * @attention
|
|
12 *
|
|
13 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
|
|
14 *
|
|
15 * Redistribution and use in source and binary forms, with or without modification,
|
|
16 * are permitted provided that the following conditions are met:
|
|
17 * 1. Redistributions of source code must retain the above copyright notice,
|
|
18 * this list of conditions and the following disclaimer.
|
|
19 * 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
20 * this list of conditions and the following disclaimer in the documentation
|
|
21 * and/or other materials provided with the distribution.
|
|
22 * 3. Neither the name of STMicroelectronics nor the names of its contributors
|
|
23 * may be used to endorse or promote products derived from this software
|
|
24 * without specific prior written permission.
|
|
25 *
|
|
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
27 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
29 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
32 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
33 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
34 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
36 *
|
|
37 ******************************************************************************
|
|
38 */
|
|
39
|
|
40 /* Includes ------------------------------------------------------------------*/
|
|
41 #include "baseCPU2.h"
|
|
42 #include "stm32f4xx_it_v3.h"
|
|
43
|
|
44 /** @addtogroup STM32F4xx_HAL_Examples
|
|
45 * @{
|
|
46 */
|
|
47
|
|
48 /** @addtogroup GPIO_IOToggle
|
|
49 * @{
|
|
50 */
|
|
51
|
|
52 /* Private typedef -----------------------------------------------------------*/
|
|
53 /* Private define ------------------------------------------------------------*/
|
|
54 /* Private macro -------------------------------------------------------------*/
|
|
55 /* Private variables ---------------------------------------------------------*/
|
|
56 extern I2C_HandleTypeDef I2cHandle;
|
|
57 extern SPI_HandleTypeDef hspi1;
|
|
58 extern RTC_HandleTypeDef RTCHandle;
|
|
59 extern ADC_HandleTypeDef AdcHandle;
|
|
60
|
662
|
61 extern UART_HandleTypeDef huart1;
|
|
62 extern DMA_HandleTypeDef hdma_usart1_rx;
|
|
63
|
38
|
64 /* Private function prototypes -----------------------------------------------*/
|
|
65 /* Private functions ---------------------------------------------------------*/
|
|
66
|
|
67 /******************************************************************************/
|
|
68 /* Cortex-M4 Processor Exceptions Handlers */
|
|
69 /******************************************************************************/
|
|
70
|
|
71 /**
|
|
72 * @brief This function handles NMI exception.
|
|
73 * @param None
|
|
74 * @retval None
|
|
75 */
|
|
76 void NMI_Handler(void)
|
|
77 {
|
|
78 }
|
|
79
|
|
80 /**
|
|
81 * @brief This function handles Hard Fault exception.
|
|
82 * @param None
|
|
83 * @retval None
|
|
84 */
|
|
85 void HardFault_Handler(void)
|
|
86 {
|
|
87 /* Go to infinite loop when Hard Fault exception occurs */
|
42
|
88 HAL_NVIC_SystemReset(); /* TODO Exception occures during startup and no iwdg is active ==> Call reset till iwdg is added */
|
38
|
89 while (1)
|
|
90 {
|
|
91 }
|
|
92 }
|
|
93
|
|
94 /**
|
|
95 * @brief This function handles Memory Manage exception.
|
|
96 * @param None
|
|
97 * @retval None
|
|
98 */
|
|
99 void MemManage_Handler(void)
|
|
100 {
|
|
101 /* Go to infinite loop when Memory Manage exception occurs */
|
|
102 while (1)
|
|
103 {
|
|
104 }
|
|
105 }
|
|
106
|
|
107 /**
|
|
108 * @brief This function handles Bus Fault exception.
|
|
109 * @param None
|
|
110 * @retval None
|
|
111 */
|
|
112 void BusFault_Handler(void)
|
|
113 {
|
|
114 /* Go to infinite loop when Bus Fault exception occurs */
|
|
115 while (1)
|
|
116 {
|
|
117 }
|
|
118 }
|
|
119
|
|
120 /**
|
|
121 * @brief This function handles Usage Fault exception.
|
|
122 * @param None
|
|
123 * @retval None
|
|
124 */
|
|
125 void UsageFault_Handler(void)
|
|
126 {
|
|
127 /* Go to infinite loop when Usage Fault exception occurs */
|
|
128 while (1)
|
|
129 {
|
|
130 }
|
|
131 }
|
|
132
|
|
133 /**
|
|
134 * @brief This function handles SVCall exception.
|
|
135 * @param None
|
|
136 * @retval None
|
|
137 */
|
|
138 void SVC_Handler(void)
|
|
139 {
|
|
140 }
|
|
141
|
|
142 /**
|
|
143 * @brief This function handles Debug Monitor exception.
|
|
144 * @param None
|
|
145 * @retval None
|
|
146 */
|
|
147 void DebugMon_Handler(void)
|
|
148 {
|
|
149 }
|
|
150
|
|
151 /**
|
|
152 * @brief This function handles PendSVC exception.
|
|
153 * @param None
|
|
154 * @retval None
|
|
155 */
|
|
156 void PendSV_Handler(void)
|
|
157 {
|
|
158 }
|
|
159
|
|
160 /**
|
|
161 * @brief This function handles SysTick Handler.
|
|
162 * @param None
|
|
163 * @retval None
|
|
164 */
|
104
|
165 //void SysTick_Handler(void)
|
|
166 //{
|
|
167 // HAL_IncTick();
|
|
168 //}
|
38
|
169
|
|
170
|
|
171 /******************************************************************************/
|
|
172 /* STM32F4xx Peripherals Interrupt Handlers */
|
|
173 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
|
|
174 /* available peripheral interrupt handler's name please refer to the startup */
|
|
175 /* file (startup_stm32f4xx.s). */
|
|
176 /******************************************************************************/
|
|
177 /**
|
|
178 * @brief This function handles I2C event interrupt request.
|
|
179 * @param None
|
|
180 * @retval None
|
|
181 * @Note This function is redefined in "main.h" and related to I2C data transmission
|
|
182 */
|
|
183 void I2Cx_EV_IRQHandler(void)
|
|
184 {
|
|
185 HAL_I2C_EV_IRQHandler(& I2cHandle);
|
|
186 }
|
|
187
|
|
188 /**
|
|
189 * @brief This function handles I2C error interrupt request.
|
|
190 * @param None
|
|
191 * @retval None
|
|
192 * @Note This function is redefined in "main.h" and related to I2C error
|
|
193 */
|
|
194 void I2Cx_ER_IRQHandler(void)
|
|
195 {
|
|
196 HAL_I2C_ER_IRQHandler(& I2cHandle);
|
|
197 }
|
|
198
|
|
199
|
|
200 /**
|
|
201 * @brief This function handles SPI interrupt request.
|
|
202 * @param None
|
|
203 * @retval None
|
|
204 */
|
|
205
|
|
206 /*
|
|
207 void SPI1_IRQHandler(void)
|
|
208 {
|
|
209 HAL_SPI_IRQHandler(&hspi1);
|
|
210 }
|
|
211 */
|
|
212
|
|
213 /**
|
|
214 * @brief This function handles DMA Tx interrupt request.
|
|
215 * @param None
|
|
216 * @retval None
|
|
217 */
|
|
218 void DMA2_Stream3_IRQHandler(void)
|
|
219 {
|
|
220 HAL_DMA_IRQHandler(hspi1.hdmatx);
|
|
221 }
|
|
222
|
|
223 /**
|
|
224 * @brief This function handles DMA Rx interrupt request.
|
|
225 * @param None
|
|
226 * @retval None
|
|
227 */
|
|
228 void DMA2_Stream0_IRQHandler(void)
|
|
229 {
|
|
230 HAL_DMA_IRQHandler(hspi1.hdmarx);
|
|
231 }
|
|
232
|
|
233 /**
|
|
234 * @brief This function handles PPP interrupt request.
|
|
235 * @param None
|
|
236 * @retval None
|
|
237 */
|
|
238
|
662
|
239 void DMA2_Stream5_IRQHandler(void)
|
|
240 {
|
|
241 HAL_DMA_IRQHandler(&hdma_usart1_rx);
|
|
242 }
|
|
243
|
38
|
244
|
|
245 /******************************************************************************/
|
|
246 /* STM32F4xx Peripherals Interrupt Handlers */
|
|
247 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
|
|
248 /* available peripheral interrupt handler's name please refer to the startup */
|
|
249 /* file (startup_stm32f4xx.s). */
|
|
250 /******************************************************************************/
|
|
251
|
|
252
|
|
253 /**
|
|
254 * @brief This function handles RTC Auto wake-up interrupt request.
|
|
255 * @param None
|
|
256 * @retval None
|
|
257 */
|
|
258 void RTC_WKUP_IRQHandler(void)
|
|
259 {
|
|
260 HAL_RTCEx_WakeUpTimerIRQHandler(&RTCHandle);
|
|
261 }
|
|
262
|
|
263 /**
|
|
264 * @brief This function handles External line 0 interrupt request.
|
|
265 * @param None
|
|
266 * @retval None
|
|
267 */
|
|
268 void EXTI15_10_IRQHandler(void)
|
|
269 {
|
|
270 HAL_GPIO_EXTI_IRQHandler(0xFF);
|
|
271 }
|
|
272
|
|
273 /* button */
|
|
274 void EXTI0_IRQHandler(void)
|
|
275 {
|
|
276 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0);
|
|
277 }
|
|
278
|
181
|
279 /* wireless 1 + 2 => was removed from OSTC4 code => placeholder*/
|
38
|
280 void EXTI1_IRQHandler(void)
|
|
281 {
|
|
282 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_1);
|
|
283 }
|
|
284
|
|
285 void EXTI2_IRQHandler(void)
|
|
286 {
|
|
287 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2);
|
|
288 }
|
|
289
|
|
290 /* test button */
|
|
291 void EXTI3_IRQHandler(void)
|
|
292 {
|
|
293 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_3);
|
|
294 }
|
|
295
|
|
296 /**
|
|
297 * @brief This function handles ADC interrupt request.
|
|
298 * @param None
|
|
299 * @retval None
|
|
300 */
|
|
301 void ADC_IRQHandler(void)
|
|
302 {
|
|
303 HAL_ADC_IRQHandler(&AdcHandle);
|
|
304 }
|
|
305
|
662
|
306
|
|
307 void USART1_IRQHandler(void)
|
|
308 {
|
|
309 HAL_UART_IRQHandler(&huart1);
|
|
310 }
|
|
311
|
38
|
312 /**
|
|
313 * @brief This function handles PPP interrupt request.
|
|
314 * @param None
|
|
315 * @retval None
|
|
316 */
|
|
317 /*void PPP_IRQHandler(void)
|
|
318 {
|
|
319 }*/
|
|
320
|
|
321 /**
|
|
322 * @}
|
|
323 */
|
|
324
|
|
325 /**
|
|
326 * @}
|
|
327 */
|
|
328
|
|
329 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|