annotate f103c8/Src/stm32f1xx_it.c @ 2:0c59e7a7782a

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