util/stm32f10x_it.c@0:f1834a63f7c1, 2017-09-04 (annotated)
- Committer:
- Sergunb
- Date:
- Mon Sep 04 12:03:42 2017 +0000
- Revision:
- 0:f1834a63f7c1
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sergunb | 0:f1834a63f7c1 | 1 | /******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** |
Sergunb | 0:f1834a63f7c1 | 2 | * File Name : stm32f10x_it.c |
Sergunb | 0:f1834a63f7c1 | 3 | * Author : MCD Application Team |
Sergunb | 0:f1834a63f7c1 | 4 | * Version : V3.3.0 |
Sergunb | 0:f1834a63f7c1 | 5 | * Date : 21-March-2011 |
Sergunb | 0:f1834a63f7c1 | 6 | * Description : Main Interrupt Service Routines. |
Sergunb | 0:f1834a63f7c1 | 7 | * This file provides template for all exceptions handler |
Sergunb | 0:f1834a63f7c1 | 8 | * and peripherals interrupt service routine. |
Sergunb | 0:f1834a63f7c1 | 9 | ******************************************************************************** |
Sergunb | 0:f1834a63f7c1 | 10 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
Sergunb | 0:f1834a63f7c1 | 11 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
Sergunb | 0:f1834a63f7c1 | 12 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
Sergunb | 0:f1834a63f7c1 | 13 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
Sergunb | 0:f1834a63f7c1 | 14 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
Sergunb | 0:f1834a63f7c1 | 15 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
Sergunb | 0:f1834a63f7c1 | 16 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 17 | #ifdef USEUSB |
Sergunb | 0:f1834a63f7c1 | 18 | /* Includes ------------------------------------------------------------------*/ |
Sergunb | 0:f1834a63f7c1 | 19 | #include "stm32f10x_it.h" |
Sergunb | 0:f1834a63f7c1 | 20 | #include "usb_lib.h" |
Sergunb | 0:f1834a63f7c1 | 21 | #include "usb_istr.h" |
Sergunb | 0:f1834a63f7c1 | 22 | #include "hw_config.h" |
Sergunb | 0:f1834a63f7c1 | 23 | |
Sergunb | 0:f1834a63f7c1 | 24 | /* Private typedef -----------------------------------------------------------*/ |
Sergunb | 0:f1834a63f7c1 | 25 | /* Private define ------------------------------------------------------------*/ |
Sergunb | 0:f1834a63f7c1 | 26 | /* Private macro -------------------------------------------------------------*/ |
Sergunb | 0:f1834a63f7c1 | 27 | /* Private variables ---------------------------------------------------------*/ |
Sergunb | 0:f1834a63f7c1 | 28 | /* Private function prototypes -----------------------------------------------*/ |
Sergunb | 0:f1834a63f7c1 | 29 | /* Private functions ---------------------------------------------------------*/ |
Sergunb | 0:f1834a63f7c1 | 30 | /******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 31 | /* Cortex-M3 Processor Exceptions Handlers */ |
Sergunb | 0:f1834a63f7c1 | 32 | /******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 33 | |
Sergunb | 0:f1834a63f7c1 | 34 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 35 | * Function Name : NMI_Handler |
Sergunb | 0:f1834a63f7c1 | 36 | * Description : This function handles NMI exception. |
Sergunb | 0:f1834a63f7c1 | 37 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 38 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 39 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 40 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 41 | void NMI_Handler(void) |
Sergunb | 0:f1834a63f7c1 | 42 | { |
Sergunb | 0:f1834a63f7c1 | 43 | } |
Sergunb | 0:f1834a63f7c1 | 44 | |
Sergunb | 0:f1834a63f7c1 | 45 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 46 | * Function Name : HardFault_Handler |
Sergunb | 0:f1834a63f7c1 | 47 | * Description : This function handles Hard Fault exception. |
Sergunb | 0:f1834a63f7c1 | 48 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 49 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 50 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 51 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 52 | void HardFault_Handler(void) |
Sergunb | 0:f1834a63f7c1 | 53 | { |
Sergunb | 0:f1834a63f7c1 | 54 | /* Go to infinite loop when Hard Fault exception occurs */ |
Sergunb | 0:f1834a63f7c1 | 55 | while (1) |
Sergunb | 0:f1834a63f7c1 | 56 | { |
Sergunb | 0:f1834a63f7c1 | 57 | } |
Sergunb | 0:f1834a63f7c1 | 58 | } |
Sergunb | 0:f1834a63f7c1 | 59 | |
Sergunb | 0:f1834a63f7c1 | 60 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 61 | * Function Name : MemManage_Handler |
Sergunb | 0:f1834a63f7c1 | 62 | * Description : This function handles Memory Manage exception. |
Sergunb | 0:f1834a63f7c1 | 63 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 64 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 65 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 66 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 67 | void MemManage_Handler(void) |
Sergunb | 0:f1834a63f7c1 | 68 | { |
Sergunb | 0:f1834a63f7c1 | 69 | /* Go to infinite loop when Memory Manage exception occurs */ |
Sergunb | 0:f1834a63f7c1 | 70 | while (1) |
Sergunb | 0:f1834a63f7c1 | 71 | { |
Sergunb | 0:f1834a63f7c1 | 72 | } |
Sergunb | 0:f1834a63f7c1 | 73 | } |
Sergunb | 0:f1834a63f7c1 | 74 | |
Sergunb | 0:f1834a63f7c1 | 75 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 76 | * Function Name : BusFault_Handler |
Sergunb | 0:f1834a63f7c1 | 77 | * Description : This function handles Bus Fault exception. |
Sergunb | 0:f1834a63f7c1 | 78 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 79 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 80 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 81 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 82 | void BusFault_Handler(void) |
Sergunb | 0:f1834a63f7c1 | 83 | { |
Sergunb | 0:f1834a63f7c1 | 84 | /* Go to infinite loop when Bus Fault exception occurs */ |
Sergunb | 0:f1834a63f7c1 | 85 | while (1) |
Sergunb | 0:f1834a63f7c1 | 86 | { |
Sergunb | 0:f1834a63f7c1 | 87 | } |
Sergunb | 0:f1834a63f7c1 | 88 | } |
Sergunb | 0:f1834a63f7c1 | 89 | |
Sergunb | 0:f1834a63f7c1 | 90 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 91 | * Function Name : UsageFault_Handler |
Sergunb | 0:f1834a63f7c1 | 92 | * Description : This function handles Usage Fault exception. |
Sergunb | 0:f1834a63f7c1 | 93 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 94 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 95 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 96 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 97 | void UsageFault_Handler(void) |
Sergunb | 0:f1834a63f7c1 | 98 | { |
Sergunb | 0:f1834a63f7c1 | 99 | /* Go to infinite loop when Usage Fault exception occurs */ |
Sergunb | 0:f1834a63f7c1 | 100 | while (1) |
Sergunb | 0:f1834a63f7c1 | 101 | { |
Sergunb | 0:f1834a63f7c1 | 102 | } |
Sergunb | 0:f1834a63f7c1 | 103 | } |
Sergunb | 0:f1834a63f7c1 | 104 | |
Sergunb | 0:f1834a63f7c1 | 105 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 106 | * Function Name : SVC_Handler |
Sergunb | 0:f1834a63f7c1 | 107 | * Description : This function handles SVCall exception. |
Sergunb | 0:f1834a63f7c1 | 108 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 109 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 110 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 111 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 112 | void SVC_Handler(void) |
Sergunb | 0:f1834a63f7c1 | 113 | { |
Sergunb | 0:f1834a63f7c1 | 114 | } |
Sergunb | 0:f1834a63f7c1 | 115 | |
Sergunb | 0:f1834a63f7c1 | 116 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 117 | * Function Name : DebugMon_Handler |
Sergunb | 0:f1834a63f7c1 | 118 | * Description : This function handles Debug Monitor exception. |
Sergunb | 0:f1834a63f7c1 | 119 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 120 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 121 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 122 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 123 | void DebugMon_Handler(void) |
Sergunb | 0:f1834a63f7c1 | 124 | { |
Sergunb | 0:f1834a63f7c1 | 125 | } |
Sergunb | 0:f1834a63f7c1 | 126 | |
Sergunb | 0:f1834a63f7c1 | 127 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 128 | * Function Name : PendSV_Handler |
Sergunb | 0:f1834a63f7c1 | 129 | * Description : This function handles PendSVC exception. |
Sergunb | 0:f1834a63f7c1 | 130 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 131 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 132 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 133 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 134 | void PendSV_Handler(void) |
Sergunb | 0:f1834a63f7c1 | 135 | { |
Sergunb | 0:f1834a63f7c1 | 136 | } |
Sergunb | 0:f1834a63f7c1 | 137 | |
Sergunb | 0:f1834a63f7c1 | 138 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 139 | * Function Name : SysTick_Handler |
Sergunb | 0:f1834a63f7c1 | 140 | * Description : This function handles SysTick Handler. |
Sergunb | 0:f1834a63f7c1 | 141 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 142 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 143 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 144 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 145 | #if 0 |
Sergunb | 0:f1834a63f7c1 | 146 | void SysTick_Handler(void) |
Sergunb | 0:f1834a63f7c1 | 147 | { |
Sergunb | 0:f1834a63f7c1 | 148 | } |
Sergunb | 0:f1834a63f7c1 | 149 | #endif |
Sergunb | 0:f1834a63f7c1 | 150 | /******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 151 | /* STM32F10x Peripherals Interrupt Handlers */ |
Sergunb | 0:f1834a63f7c1 | 152 | /******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 153 | |
Sergunb | 0:f1834a63f7c1 | 154 | #ifndef STM32F10X_CL |
Sergunb | 0:f1834a63f7c1 | 155 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 156 | * Function Name : USB_LP_CAN1_RX0_IRQHandler |
Sergunb | 0:f1834a63f7c1 | 157 | * Description : This function handles USB Low Priority or CAN RX0 interrupts |
Sergunb | 0:f1834a63f7c1 | 158 | * requests. |
Sergunb | 0:f1834a63f7c1 | 159 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 160 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 161 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 162 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 163 | void USB_LP_CAN1_RX0_IRQHandler(void) |
Sergunb | 0:f1834a63f7c1 | 164 | { |
Sergunb | 0:f1834a63f7c1 | 165 | USB_Istr(); |
Sergunb | 0:f1834a63f7c1 | 166 | } |
Sergunb | 0:f1834a63f7c1 | 167 | #endif /* STM32F10X_CL */ |
Sergunb | 0:f1834a63f7c1 | 168 | |
Sergunb | 0:f1834a63f7c1 | 169 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 170 | * Function Name : EVAL_COM1_IRQHandler |
Sergunb | 0:f1834a63f7c1 | 171 | * Description : This function handles EVAL_COM1 global interrupt request. |
Sergunb | 0:f1834a63f7c1 | 172 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 173 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 174 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 175 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 176 | void EVAL_COM1_IRQHandler(void) |
Sergunb | 0:f1834a63f7c1 | 177 | { |
Sergunb | 0:f1834a63f7c1 | 178 | #if 0 |
Sergunb | 0:f1834a63f7c1 | 179 | if (USART_GetITStatus(EVAL_COM1, USART_IT_RXNE) != RESET) |
Sergunb | 0:f1834a63f7c1 | 180 | { |
Sergunb | 0:f1834a63f7c1 | 181 | /* Send the received data to the PC Host*/ |
Sergunb | 0:f1834a63f7c1 | 182 | USART_To_USB_Send_Data(); |
Sergunb | 0:f1834a63f7c1 | 183 | } |
Sergunb | 0:f1834a63f7c1 | 184 | |
Sergunb | 0:f1834a63f7c1 | 185 | /* If overrun condition occurs, clear the ORE flag and recover communication */ |
Sergunb | 0:f1834a63f7c1 | 186 | if (USART_GetFlagStatus(EVAL_COM1, USART_FLAG_ORE) != RESET) |
Sergunb | 0:f1834a63f7c1 | 187 | { |
Sergunb | 0:f1834a63f7c1 | 188 | (void)USART_ReceiveData(EVAL_COM1); |
Sergunb | 0:f1834a63f7c1 | 189 | } |
Sergunb | 0:f1834a63f7c1 | 190 | #endif |
Sergunb | 0:f1834a63f7c1 | 191 | } |
Sergunb | 0:f1834a63f7c1 | 192 | |
Sergunb | 0:f1834a63f7c1 | 193 | |
Sergunb | 0:f1834a63f7c1 | 194 | #ifdef STM32F10X_CL |
Sergunb | 0:f1834a63f7c1 | 195 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 196 | * Function Name : OTG_FS_IRQHandler |
Sergunb | 0:f1834a63f7c1 | 197 | * Description : This function handles USB-On-The-Go FS global interrupt request. |
Sergunb | 0:f1834a63f7c1 | 198 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 199 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 200 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 201 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 202 | void OTG_FS_IRQHandler(void) |
Sergunb | 0:f1834a63f7c1 | 203 | { |
Sergunb | 0:f1834a63f7c1 | 204 | STM32_PCD_OTG_ISR_Handler(); |
Sergunb | 0:f1834a63f7c1 | 205 | } |
Sergunb | 0:f1834a63f7c1 | 206 | #endif /* STM32F10X_CL */ |
Sergunb | 0:f1834a63f7c1 | 207 | |
Sergunb | 0:f1834a63f7c1 | 208 | /******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 209 | /* STM32F10x Peripherals Interrupt Handlers */ |
Sergunb | 0:f1834a63f7c1 | 210 | /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */ |
Sergunb | 0:f1834a63f7c1 | 211 | /* available peripheral interrupt handler's name please refer to the startup */ |
Sergunb | 0:f1834a63f7c1 | 212 | /* file (startup_stm32f10x_xx.s). */ |
Sergunb | 0:f1834a63f7c1 | 213 | /******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 214 | |
Sergunb | 0:f1834a63f7c1 | 215 | /******************************************************************************* |
Sergunb | 0:f1834a63f7c1 | 216 | * Function Name : PPP_IRQHandler |
Sergunb | 0:f1834a63f7c1 | 217 | * Description : This function handles PPP interrupt request. |
Sergunb | 0:f1834a63f7c1 | 218 | * Input : None |
Sergunb | 0:f1834a63f7c1 | 219 | * Output : None |
Sergunb | 0:f1834a63f7c1 | 220 | * Return : None |
Sergunb | 0:f1834a63f7c1 | 221 | *******************************************************************************/ |
Sergunb | 0:f1834a63f7c1 | 222 | /*void PPP_IRQHandler(void) |
Sergunb | 0:f1834a63f7c1 | 223 | { |
Sergunb | 0:f1834a63f7c1 | 224 | }*/ |
Sergunb | 0:f1834a63f7c1 | 225 | |
Sergunb | 0:f1834a63f7c1 | 226 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ |
Sergunb | 0:f1834a63f7c1 | 227 | |
Sergunb | 0:f1834a63f7c1 | 228 | #endif |