STM8S/A Standard Peripherals Firmware Library
|
STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c
Go to the documentation of this file.
00001 /** 00002 ****************************************************************************** 00003 * @file stm8s_it.c 00004 * @author MCD Application Team 00005 * @version V2.2.0 00006 * @date 30-September-2014 00007 * @brief Main Interrupt Service Routines. 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2> 00012 * 00013 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 00014 * You may not use this file except in compliance with the License. 00015 * You may obtain a copy of the License at: 00016 * 00017 * http://www.st.com/software_license_agreement_liberty_v2 00018 * 00019 * Unless required by applicable law or agreed to in writing, software 00020 * distributed under the License is distributed on an "AS IS" BASIS, 00021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00022 * See the License for the specific language governing permissions and 00023 * limitations under the License. 00024 * 00025 ****************************************************************************** 00026 */ 00027 00028 /* Includes ------------------------------------------------------------------*/ 00029 #include "stm8s_it.h" 00030 00031 /* Private typedef -----------------------------------------------------------*/ 00032 /* Private define ------------------------------------------------------------*/ 00033 /* Private macro -------------------------------------------------------------*/ 00034 /* Private variables ---------------------------------------------------------*/ 00035 /* Private function prototypes -----------------------------------------------*/ 00036 extern void TimingDelay_Decrement(void); 00037 /* Private functions ---------------------------------------------------------*/ 00038 00039 /* Public functions ----------------------------------------------------------*/ 00040 00041 /** @addtogroup TIM4_TimeBase 00042 * @{ 00043 */ 00044 #ifdef _COSMIC_ 00045 /** 00046 * @brief Dummy interrupt routine 00047 * @param None 00048 * @retval None 00049 */ 00050 INTERRUPT_HANDLER(NonHandledInterrupt, 25) 00051 { 00052 /* In order to detect unexpected events during development, 00053 it is recommended to set a breakpoint on the following instruction. 00054 */ 00055 } 00056 #endif /*_COSMIC_*/ 00057 00058 /** 00059 * @brief TRAP interrupt routine 00060 * @param None 00061 * @retval None 00062 */ 00063 INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler) 00064 { 00065 /* In order to detect unexpected events during development, 00066 it is recommended to set a breakpoint on the following instruction. 00067 */ 00068 } 00069 /** 00070 * @brief Top Level Interrupt routine 00071 * @param None 00072 * @retval None 00073 */ 00074 INTERRUPT_HANDLER(TLI_IRQHandler, 0) 00075 { 00076 /* In order to detect unexpected events during development, 00077 it is recommended to set a breakpoint on the following instruction. 00078 */ 00079 } 00080 00081 /** 00082 * @brief Auto Wake Up Interrupt routine 00083 * @param None 00084 * @retval None 00085 */ 00086 INTERRUPT_HANDLER(AWU_IRQHandler, 1) 00087 { 00088 /* In order to detect unexpected events during development, 00089 it is recommended to set a breakpoint on the following instruction. 00090 */ 00091 } 00092 00093 /** 00094 * @brief Clock Controller Interrupt routine 00095 * @param None 00096 * @retval None 00097 */ 00098 INTERRUPT_HANDLER(CLK_IRQHandler, 2) 00099 { 00100 /* In order to detect unexpected events during development, 00101 it is recommended to set a breakpoint on the following instruction. 00102 */ 00103 } 00104 00105 /** 00106 * @brief External Interrupt PORTA Interrupt routine 00107 * @param None 00108 * @retval None 00109 */ 00110 INTERRUPT_HANDLER(EXTI_PORTA_IRQHandler, 3) 00111 { 00112 /* In order to detect unexpected events during development, 00113 it is recommended to set a breakpoint on the following instruction. 00114 */ 00115 } 00116 00117 /** 00118 * @brief External Interrupt PORTB Interrupt routine 00119 * @param None 00120 * @retval None 00121 */ 00122 INTERRUPT_HANDLER(EXTI_PORTB_IRQHandler, 4) 00123 { 00124 /* In order to detect unexpected events during development, 00125 it is recommended to set a breakpoint on the following instruction. 00126 */ 00127 } 00128 00129 /** 00130 * @brief External Interrupt PORTC Interrupt routine 00131 * @param None 00132 * @retval None 00133 */ 00134 INTERRUPT_HANDLER(EXTI_PORTC_IRQHandler, 5) 00135 { 00136 /* In order to detect unexpected events during development, 00137 it is recommended to set a breakpoint on the following instruction. 00138 */ 00139 } 00140 00141 /** 00142 * @brief External Interrupt PORTD Interrupt routine 00143 * @param None 00144 * @retval None 00145 */ 00146 INTERRUPT_HANDLER(EXTI_PORTD_IRQHandler, 6) 00147 { 00148 /* In order to detect unexpected events during development, 00149 it is recommended to set a breakpoint on the following instruction. 00150 */ 00151 } 00152 00153 /** 00154 * @brief External Interrupt PORTE Interrupt routine 00155 * @param None 00156 * @retval None 00157 */ 00158 INTERRUPT_HANDLER(EXTI_PORTE_IRQHandler, 7) 00159 { 00160 /* In order to detect unexpected events during development, 00161 it is recommended to set a breakpoint on the following instruction. 00162 */ 00163 } 00164 #ifdef STM8S903 00165 /** 00166 * @brief External Interrupt PORTF Interrupt routine 00167 * @param None 00168 * @retval None 00169 */ 00170 INTERRUPT_HANDLER(EXTI_PORTF_IRQHandler, 8) 00171 { 00172 /* In order to detect unexpected events during development, 00173 it is recommended to set a breakpoint on the following instruction. 00174 */ 00175 } 00176 #endif /*STM8S903*/ 00177 00178 #if defined (STM8S208) || defined (STM8AF52Ax) 00179 /** 00180 * @brief CAN RX Interrupt routine. 00181 * @param None 00182 * @retval None 00183 */ 00184 INTERRUPT_HANDLER(CAN_RX_IRQHandler, 8) 00185 { 00186 /* In order to detect unexpected events during development, 00187 it is recommended to set a breakpoint on the following instruction. 00188 */ 00189 } 00190 00191 /** 00192 * @brief CAN TX Interrupt routine 00193 * @param None 00194 * @retval None 00195 */ 00196 INTERRUPT_HANDLER(CAN_TX_IRQHandler, 9) 00197 { 00198 /* In order to detect unexpected events during development, 00199 it is recommended to set a breakpoint on the following instruction. 00200 */ 00201 } 00202 #endif /*STM8S208 || STM8AF52Ax */ 00203 00204 /** 00205 * @brief SPI Interrupt routine 00206 * @param None 00207 * @retval None 00208 */ 00209 INTERRUPT_HANDLER(SPI_IRQHandler, 10) 00210 { 00211 /* In order to detect unexpected events during development, 00212 it is recommended to set a breakpoint on the following instruction. 00213 */ 00214 } 00215 00216 /** 00217 * @brief Timer1 Update/Overflow/Trigger/Break Interrupt routine 00218 * @param None 00219 * @retval None 00220 */ 00221 INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_BRK_IRQHandler, 11) 00222 { 00223 /* In order to detect unexpected events during development, 00224 it is recommended to set a breakpoint on the following instruction. 00225 */ 00226 } 00227 00228 /** 00229 * @brief Timer1 Capture/Compare Interrupt routine 00230 * @param None 00231 * @retval None 00232 */ 00233 INTERRUPT_HANDLER(TIM1_CAP_COM_IRQHandler, 12) 00234 { 00235 /* In order to detect unexpected events during development, 00236 it is recommended to set a breakpoint on the following instruction. 00237 */ 00238 } 00239 00240 #ifdef STM8S903 00241 /** 00242 * @brief Timer5 Update/Overflow/Break/Trigger Interrupt routine 00243 * @param None 00244 * @retval None 00245 */ 00246 INTERRUPT_HANDLER(TIM5_UPD_OVF_BRK_TRG_IRQHandler, 13) 00247 { 00248 /* In order to detect unexpected events during development, 00249 it is recommended to set a breakpoint on the following instruction. 00250 */ 00251 } 00252 /** 00253 * @brief Timer5 Capture/Compare Interrupt routine 00254 * @param None 00255 * @retval None 00256 */ 00257 INTERRUPT_HANDLER(TIM5_CAP_COM_IRQHandler, 14) 00258 { 00259 /* In order to detect unexpected events during development, 00260 it is recommended to set a breakpoint on the following instruction. 00261 */ 00262 } 00263 00264 #else /*STM8S208, STM8S207, STM8S105 or STM8S103 or STM8AF62Ax or STM8AF52Ax or STM8AF626x */ 00265 /** 00266 * @brief Timer2 Update/Overflow/Break Interrupt routine 00267 * @param None 00268 * @retval None 00269 */ 00270 INTERRUPT_HANDLER(TIM2_UPD_OVF_BRK_IRQHandler, 13) 00271 { 00272 /* In order to detect unexpected events during development, 00273 it is recommended to set a breakpoint on the following instruction. 00274 */ 00275 } 00276 00277 /** 00278 * @brief Timer2 Capture/Compare Interrupt routine 00279 * @param None 00280 * @retval None 00281 */ 00282 INTERRUPT_HANDLER(TIM2_CAP_COM_IRQHandler, 14) 00283 { 00284 /* In order to detect unexpected events during development, 00285 it is recommended to set a breakpoint on the following instruction. 00286 */ 00287 } 00288 #endif /*STM8S903*/ 00289 00290 #if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S105) || \ 00291 defined(STM8S005) || defined (STM8AF62Ax) || defined (STM8AF52Ax) || defined (STM8AF626x) 00292 /** 00293 * @brief Timer3 Update/Overflow/Break Interrupt routine. 00294 * @param None 00295 * @retval None 00296 */ 00297 INTERRUPT_HANDLER(TIM3_UPD_OVF_BRK_IRQHandler, 15) 00298 { 00299 /* In order to detect unexpected events during development, 00300 it is recommended to set a breakpoint on the following instruction. 00301 */ 00302 } 00303 00304 /** 00305 * @brief Timer3 Capture/Compare Interrupt routine 00306 * @param None 00307 * @retval None 00308 */ 00309 INTERRUPT_HANDLER(TIM3_CAP_COM_IRQHandler, 16) 00310 { 00311 /* In order to detect unexpected events during development, 00312 it is recommended to set a breakpoint on the following instruction. 00313 */ 00314 } 00315 #endif /*STM8S208, STM8S207 or STM8S105 or STM8AF62Ax or STM8AF52Ax or STM8AF626x */ 00316 00317 #if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S103) || \ 00318 defined(STM8S003) || defined (STM8AF62Ax) || defined (STM8AF52Ax) || defined (STM8S903) 00319 /** 00320 * @brief UART1 TX Interrupt routine 00321 * @param None 00322 * @retval None 00323 */ 00324 INTERRUPT_HANDLER(UART1_TX_IRQHandler, 17) 00325 { 00326 /* In order to detect unexpected events during development, 00327 it is recommended to set a breakpoint on the following instruction. 00328 */ 00329 } 00330 00331 /** 00332 * @brief UART1 RX Interrupt routine 00333 * @param None 00334 * @retval None 00335 */ 00336 INTERRUPT_HANDLER(UART1_RX_IRQHandler, 18) 00337 { 00338 /* In order to detect unexpected events during development, 00339 it is recommended to set a breakpoint on the following instruction. 00340 */ 00341 } 00342 #endif /*STM8S105*/ 00343 00344 /** 00345 * @brief I2C Interrupt routine 00346 * @param None 00347 * @retval None 00348 */ 00349 INTERRUPT_HANDLER(I2C_IRQHandler, 19) 00350 { 00351 /* In order to detect unexpected events during development, 00352 it is recommended to set a breakpoint on the following instruction. 00353 */ 00354 } 00355 00356 #if defined(STM8S105) || defined(STM8S005) || defined (STM8AF626x) 00357 /** 00358 * @brief UART2 TX interrupt routine. 00359 * @param None 00360 * @retval None 00361 */ 00362 INTERRUPT_HANDLER(UART2_TX_IRQHandler, 20) 00363 { 00364 /* In order to detect unexpected events during development, 00365 it is recommended to set a breakpoint on the following instruction. 00366 */ 00367 } 00368 00369 /** 00370 * @brief UART2 RX interrupt routine. 00371 * @param None 00372 * @retval None 00373 */ 00374 INTERRUPT_HANDLER(UART2_RX_IRQHandler, 21) 00375 { 00376 /* In order to detect unexpected events during development, 00377 it is recommended to set a breakpoint on the following instruction. 00378 */ 00379 } 00380 #endif /* STM8S105*/ 00381 00382 #if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax) 00383 /** 00384 * @brief UART3 TX interrupt routine. 00385 * @param None 00386 * @retval None 00387 */ 00388 INTERRUPT_HANDLER(UART3_TX_IRQHandler, 20) 00389 { 00390 /* In order to detect unexpected events during development, 00391 it is recommended to set a breakpoint on the following instruction. 00392 */ 00393 } 00394 00395 /** 00396 * @brief UART3 RX interrupt routine. 00397 * @param None 00398 * @retval None 00399 */ 00400 INTERRUPT_HANDLER(UART3_RX_IRQHandler, 21) 00401 { 00402 /* In order to detect unexpected events during development, 00403 it is recommended to set a breakpoint on the following instruction. 00404 */ 00405 } 00406 #endif /*STM8S208 or STM8S207 or STM8AF52Ax or STM8AF62Ax */ 00407 00408 #if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax) 00409 /** 00410 * @brief ADC2 interrupt routine. 00411 * @param None 00412 * @retval None 00413 */ 00414 INTERRUPT_HANDLER(ADC2_IRQHandler, 22) 00415 { 00416 00417 /* In order to detect unexpected events during development, 00418 it is recommended to set a breakpoint on the following instruction. 00419 */ 00420 return; 00421 00422 } 00423 #else /*STM8S105, STM8S103 or STM8S903 or STM8AF626x */ 00424 /** 00425 * @brief ADC1 interrupt routine. 00426 * @param None 00427 * @retval None 00428 */ 00429 INTERRUPT_HANDLER(ADC1_IRQHandler, 22) 00430 { 00431 00432 /* In order to detect unexpected events during development, 00433 it is recommended to set a breakpoint on the following instruction. 00434 */ 00435 return; 00436 00437 } 00438 #endif /*STM8S208 or STM8S207 or STM8AF52Ax or STM8AF62Ax */ 00439 00440 #ifdef STM8S903 00441 /** 00442 * @brief Timer6 Update/Overflow/Trigger Interrupt routine 00443 * @param None 00444 * @retval None 00445 */ 00446 INTERRUPT_HANDLER(TIM6_UPD_OVF_TRG_IRQHandler, 23) 00447 { 00448 /* In order to detect unexpected events during development, 00449 it is recommended to set a breakpoint on the following instruction. 00450 */ 00451 } 00452 #else /*STM8S208, STM8S207, STM8S105 or STM8S103 or STM8AF62Ax or STM8AF52Ax or STM8AF626x */ 00453 /** 00454 * @brief Timer4 Update/Overflow Interrupt routine 00455 * @param None 00456 * @retval None 00457 */ 00458 INTERRUPT_HANDLER(TIM4_UPD_OVF_IRQHandler, 23) 00459 { 00460 TimingDelay_Decrement(); 00461 /* Cleat Interrupt Pending bit */ 00462 TIM4_ClearITPendingBit(TIM4_IT_UPDATE); 00463 00464 } 00465 #endif /*STM8S903*/ 00466 00467 /** 00468 * @brief Eeprom EEC Interrupt routine 00469 * @param None 00470 * @retval None 00471 */ 00472 INTERRUPT_HANDLER(EEPROM_EEC_IRQHandler, 24) 00473 { 00474 /* In order to detect unexpected events during development, 00475 it is recommended to set a breakpoint on the following instruction. 00476 */ 00477 } 00478 00479 /** 00480 * @} 00481 */ 00482 00483 00484 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/