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
+ − 61 /* Private function prototypes -----------------------------------------------*/
+ − 62 /* Private functions ---------------------------------------------------------*/
+ − 63
+ − 64 /******************************************************************************/
+ − 65 /* Cortex-M4 Processor Exceptions Handlers */
+ − 66 /******************************************************************************/
+ − 67
+ − 68 /**
+ − 69 * @brief This function handles NMI exception.
+ − 70 * @param None
+ − 71 * @retval None
+ − 72 */
+ − 73 void NMI_Handler(void)
+ − 74 {
+ − 75 }
+ − 76
+ − 77 /**
+ − 78 * @brief This function handles Hard Fault exception.
+ − 79 * @param None
+ − 80 * @retval None
+ − 81 */
+ − 82 void HardFault_Handler(void)
+ − 83 {
+ − 84 /* Go to infinite loop when Hard Fault exception occurs */
42
+ − 85 HAL_NVIC_SystemReset(); /* TODO Exception occures during startup and no iwdg is active ==> Call reset till iwdg is added */
38
+ − 86 while (1)
+ − 87 {
+ − 88 }
+ − 89 }
+ − 90
+ − 91 /**
+ − 92 * @brief This function handles Memory Manage exception.
+ − 93 * @param None
+ − 94 * @retval None
+ − 95 */
+ − 96 void MemManage_Handler(void)
+ − 97 {
+ − 98 /* Go to infinite loop when Memory Manage exception occurs */
+ − 99 while (1)
+ − 100 {
+ − 101 }
+ − 102 }
+ − 103
+ − 104 /**
+ − 105 * @brief This function handles Bus Fault exception.
+ − 106 * @param None
+ − 107 * @retval None
+ − 108 */
+ − 109 void BusFault_Handler(void)
+ − 110 {
+ − 111 /* Go to infinite loop when Bus Fault exception occurs */
+ − 112 while (1)
+ − 113 {
+ − 114 }
+ − 115 }
+ − 116
+ − 117 /**
+ − 118 * @brief This function handles Usage Fault exception.
+ − 119 * @param None
+ − 120 * @retval None
+ − 121 */
+ − 122 void UsageFault_Handler(void)
+ − 123 {
+ − 124 /* Go to infinite loop when Usage Fault exception occurs */
+ − 125 while (1)
+ − 126 {
+ − 127 }
+ − 128 }
+ − 129
+ − 130 /**
+ − 131 * @brief This function handles SVCall exception.
+ − 132 * @param None
+ − 133 * @retval None
+ − 134 */
+ − 135 void SVC_Handler(void)
+ − 136 {
+ − 137 }
+ − 138
+ − 139 /**
+ − 140 * @brief This function handles Debug Monitor exception.
+ − 141 * @param None
+ − 142 * @retval None
+ − 143 */
+ − 144 void DebugMon_Handler(void)
+ − 145 {
+ − 146 }
+ − 147
+ − 148 /**
+ − 149 * @brief This function handles PendSVC exception.
+ − 150 * @param None
+ − 151 * @retval None
+ − 152 */
+ − 153 void PendSV_Handler(void)
+ − 154 {
+ − 155 }
+ − 156
+ − 157 /**
+ − 158 * @brief This function handles SysTick Handler.
+ − 159 * @param None
+ − 160 * @retval None
+ − 161 */
104
+ − 162 //void SysTick_Handler(void)
+ − 163 //{
+ − 164 // HAL_IncTick();
+ − 165 //}
38
+ − 166
+ − 167
+ − 168 /******************************************************************************/
+ − 169 /* STM32F4xx Peripherals Interrupt Handlers */
+ − 170 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
+ − 171 /* available peripheral interrupt handler's name please refer to the startup */
+ − 172 /* file (startup_stm32f4xx.s). */
+ − 173 /******************************************************************************/
+ − 174 /**
+ − 175 * @brief This function handles I2C event interrupt request.
+ − 176 * @param None
+ − 177 * @retval None
+ − 178 * @Note This function is redefined in "main.h" and related to I2C data transmission
+ − 179 */
+ − 180 void I2Cx_EV_IRQHandler(void)
+ − 181 {
+ − 182 HAL_I2C_EV_IRQHandler(& I2cHandle);
+ − 183 }
+ − 184
+ − 185 /**
+ − 186 * @brief This function handles I2C error interrupt request.
+ − 187 * @param None
+ − 188 * @retval None
+ − 189 * @Note This function is redefined in "main.h" and related to I2C error
+ − 190 */
+ − 191 void I2Cx_ER_IRQHandler(void)
+ − 192 {
+ − 193 HAL_I2C_ER_IRQHandler(& I2cHandle);
+ − 194 }
+ − 195
+ − 196
+ − 197 /**
+ − 198 * @brief This function handles SPI interrupt request.
+ − 199 * @param None
+ − 200 * @retval None
+ − 201 */
+ − 202
+ − 203 /*
+ − 204 void SPI1_IRQHandler(void)
+ − 205 {
+ − 206 HAL_SPI_IRQHandler(&hspi1);
+ − 207 }
+ − 208 */
+ − 209
+ − 210 /**
+ − 211 * @brief This function handles DMA Tx interrupt request.
+ − 212 * @param None
+ − 213 * @retval None
+ − 214 */
+ − 215 void DMA2_Stream3_IRQHandler(void)
+ − 216 {
+ − 217 HAL_DMA_IRQHandler(hspi1.hdmatx);
+ − 218 }
+ − 219
+ − 220 /**
+ − 221 * @brief This function handles DMA Rx interrupt request.
+ − 222 * @param None
+ − 223 * @retval None
+ − 224 */
+ − 225 void DMA2_Stream0_IRQHandler(void)
+ − 226 {
+ − 227 HAL_DMA_IRQHandler(hspi1.hdmarx);
+ − 228 }
+ − 229
+ − 230 /**
+ − 231 * @brief This function handles PPP interrupt request.
+ − 232 * @param None
+ − 233 * @retval None
+ − 234 */
+ − 235
+ − 236
+ − 237 /******************************************************************************/
+ − 238 /* STM32F4xx Peripherals Interrupt Handlers */
+ − 239 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
+ − 240 /* available peripheral interrupt handler's name please refer to the startup */
+ − 241 /* file (startup_stm32f4xx.s). */
+ − 242 /******************************************************************************/
+ − 243
+ − 244
+ − 245 /**
+ − 246 * @brief This function handles RTC Auto wake-up interrupt request.
+ − 247 * @param None
+ − 248 * @retval None
+ − 249 */
+ − 250 void RTC_WKUP_IRQHandler(void)
+ − 251 {
+ − 252 HAL_RTCEx_WakeUpTimerIRQHandler(&RTCHandle);
+ − 253 }
+ − 254
+ − 255 /**
+ − 256 * @brief This function handles External line 0 interrupt request.
+ − 257 * @param None
+ − 258 * @retval None
+ − 259 */
+ − 260 void EXTI15_10_IRQHandler(void)
+ − 261 {
+ − 262 HAL_GPIO_EXTI_IRQHandler(0xFF);
+ − 263 }
+ − 264
+ − 265 /* button */
+ − 266 void EXTI0_IRQHandler(void)
+ − 267 {
+ − 268 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0);
+ − 269 }
+ − 270
181
+ − 271 /* wireless 1 + 2 => was removed from OSTC4 code => placeholder*/
38
+ − 272 void EXTI1_IRQHandler(void)
+ − 273 {
+ − 274 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_1);
+ − 275 }
+ − 276
+ − 277 void EXTI2_IRQHandler(void)
+ − 278 {
+ − 279 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2);
+ − 280 }
+ − 281
+ − 282 /* test button */
+ − 283 void EXTI3_IRQHandler(void)
+ − 284 {
+ − 285 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_3);
+ − 286 }
+ − 287
+ − 288 /**
+ − 289 * @brief This function handles ADC interrupt request.
+ − 290 * @param None
+ − 291 * @retval None
+ − 292 */
+ − 293 void ADC_IRQHandler(void)
+ − 294 {
+ − 295 HAL_ADC_IRQHandler(&AdcHandle);
+ − 296 }
+ − 297
+ − 298 /**
+ − 299 * @brief This function handles PPP interrupt request.
+ − 300 * @param None
+ − 301 * @retval None
+ − 302 */
+ − 303 /*void PPP_IRQHandler(void)
+ − 304 {
+ − 305 }*/
+ − 306
+ − 307 /**
+ − 308 * @}
+ − 309 */
+ − 310
+ − 311 /**
+ − 312 * @}
+ − 313 */
+ − 314
+ − 315 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/