1 /* USER CODE BEGIN Header */ 2 /** 3 ****************************************************************************** 4 * @file stm32l0xx_it.c 5 * @brief Interrupt Service Routines. 6 ****************************************************************************** 7 * @attention 8 * 9 * <h2><center>© Copyright (c) 2019 STMicroelectronics. 10 * All rights reserved.</center></h2> 11 * 12 * This software component is licensed by ST under BSD 3-Clause license, 13 * the "License"; You may not use this file except in compliance with the 14 * License. You may obtain a copy of the License at: 15 * opensource.org/licenses/BSD-3-Clause 16 * 17 ****************************************************************************** 18 */ 19 /* USER CODE END Header */ 20 21 /* Includes ------------------------------------------------------------------*/ 22 #include "main.h" 23 #include "stm32l0xx_it.h" 24 /* Private includes ----------------------------------------------------------*/ 25 /* USER CODE BEGIN Includes */ 26 /* USER CODE END Includes */ 27 28 /* Private typedef -----------------------------------------------------------*/ 29 /* USER CODE BEGIN TD */ 30 31 /* USER CODE END TD */ 32 33 /* Private define ------------------------------------------------------------*/ 34 /* USER CODE BEGIN PD */ 35 36 /* USER CODE END PD */ 37 38 /* Private macro -------------------------------------------------------------*/ 39 /* USER CODE BEGIN PM */ 40 41 /* USER CODE END PM */ 42 43 /* Private variables ---------------------------------------------------------*/ 44 /* USER CODE BEGIN PV */ 45 46 /* USER CODE END PV */ 47 48 /* Private function prototypes -----------------------------------------------*/ 49 /* USER CODE BEGIN PFP */ 50 51 /* USER CODE END PFP */ 52 53 /* Private user code ---------------------------------------------------------*/ 54 /* USER CODE BEGIN 0 */ 55 56 /* USER CODE END 0 */ 57 58 /* External variables --------------------------------------------------------*/ 59 extern DMA_HandleTypeDef hdma_spi1_rx; 60 extern DMA_HandleTypeDef hdma_spi1_tx; 61 /* USER CODE BEGIN EV */ 62 63 /* USER CODE END EV */ 64 65 /******************************************************************************/ 66 /* Cortex-M0+ Processor Interruption and Exception Handlers */ 67 /******************************************************************************/ 68 /** 69 * @brief This function handles Non maskable Interrupt. 70 */ 71 void NMI_Handler(void) 72 { 73 /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ 74 75 /* USER CODE END NonMaskableInt_IRQn 0 */ 76 /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ 77 78 /* USER CODE END NonMaskableInt_IRQn 1 */ 79 } 80 81 /** 82 * @brief This function handles Hard fault interrupt. 83 */ 84 void HardFault_Handler(void) 85 { 86 /* USER CODE BEGIN HardFault_IRQn 0 */ 87 88 /* USER CODE END HardFault_IRQn 0 */ 89 while (1) 90 { 91 /* USER CODE BEGIN W1_HardFault_IRQn 0 */ 92 /* USER CODE END W1_HardFault_IRQn 0 */ 93 } 94 } 95 96 /** 97 * @brief This function handles System service call via SWI instruction. 98 */ 99 void SVC_Handler(void) 100 { 101 /* USER CODE BEGIN SVC_IRQn 0 */ 102 103 /* USER CODE END SVC_IRQn 0 */ 104 /* USER CODE BEGIN SVC_IRQn 1 */ 105 106 /* USER CODE END SVC_IRQn 1 */ 107 } 108 109 /** 110 * @brief This function handles Pendable request for system service. 111 */ 112 void PendSV_Handler(void) 113 { 114 /* USER CODE BEGIN PendSV_IRQn 0 */ 115 116 /* USER CODE END PendSV_IRQn 0 */ 117 /* USER CODE BEGIN PendSV_IRQn 1 */ 118 119 /* USER CODE END PendSV_IRQn 1 */ 120 } 121 122 /** 123 * @brief This function handles System tick timer. 124 */ 125 void SysTick_Handler(void) 126 { 127 /* USER CODE BEGIN SysTick_IRQn 0 */ 128 129 /* USER CODE END SysTick_IRQn 0 */ 130 HAL_IncTick(); 131 /* USER CODE BEGIN SysTick_IRQn 1 */ 132 133 /* USER CODE END SysTick_IRQn 1 */ 134 } 135 136 /******************************************************************************/ 137 /* STM32L0xx Peripheral Interrupt Handlers */ 138 /* Add here the Interrupt Handlers for the used peripherals. */ 139 /* For the available peripheral interrupt handler names, */ 140 /* please refer to the startup file (startup_stm32l0xx.s). */ 141 /******************************************************************************/ 142 143 /** 144 * @brief This function handles DMA1 channel 2 and channel 3 interrupts. 145 */ 146 void DMA1_Channel2_3_IRQHandler(void) 147 { 148 /* USER CODE BEGIN DMA1_Channel2_3_IRQn 0 */ 149 150 /* USER CODE END DMA1_Channel2_3_IRQn 0 */ 151 HAL_DMA_IRQHandler(&hdma_spi1_rx); 152 HAL_DMA_IRQHandler(&hdma_spi1_tx); 153 /* USER CODE BEGIN DMA1_Channel2_3_IRQn 1 */ 154 155 /* USER CODE END DMA1_Channel2_3_IRQn 1 */ 156 } 157 158 /* USER CODE BEGIN 1 */ 159 160 /* USER CODE END 1 */ 161 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 162