STM8S/A Standard Peripherals Firmware Library
|
STM8S_StdPeriph_Examples/CLK/CLK_ClockSelection/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 #include "stm8s_eval.h" 00031 #include "stm8s_eval_lcd.h" 00032 00033 /* Private typedef -----------------------------------------------------------*/ 00034 /* Private define ------------------------------------------------------------*/ 00035 /* Private macro -------------------------------------------------------------*/ 00036 /* Private variables ---------------------------------------------------------*/ 00037 extern __IO uint8_t OscillatorStatus; 00038 /* Private function prototypes -----------------------------------------------*/ 00039 /* Private functions ---------------------------------------------------------*/ 00040 00041 /* Public functions ----------------------------------------------------------*/ 00042 00043 /** @addtogroup CLK_ClockSelection 00044 * @{ 00045 */ 00046 #ifdef _COSMIC_ 00047 /** 00048 * @brief Dummy interrupt routine 00049 * @param None 00050 * @retval None 00051 */ 00052 INTERRUPT_HANDLER(NonHandledInterrupt, 25) 00053 { 00054 /* In order to detect unexpected events during development, 00055 it is recommended to set a breakpoint on the following instruction. 00056 */ 00057 } 00058 #endif /*_COSMIC_*/ 00059 00060 /** 00061 * @brief TRAP interrupt routine 00062 * @param None 00063 * @retval None 00064 */ 00065 INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler) 00066 { 00067 /* In order to detect unexpected events during development, 00068 it is recommended to set a breakpoint on the following instruction. 00069 */ 00070 } 00071 /** 00072 * @brief Top Level Interrupt routine 00073 * @param None 00074 * @retval None 00075 */ 00076 INTERRUPT_HANDLER(TLI_IRQHandler, 0) 00077 { 00078 /* In order to detect unexpected events during development, 00079 it is recommended to set a breakpoint on the following instruction. 00080 */ 00081 } 00082 00083 /** 00084 * @brief Auto Wake Up Interrupt routine 00085 * @param None 00086 * @retval None 00087 */ 00088 INTERRUPT_HANDLER(AWU_IRQHandler, 1) 00089 { 00090 /* In order to detect unexpected events during development, 00091 it is recommended to set a breakpoint on the following instruction. 00092 */ 00093 } 00094 00095 /** 00096 * @brief Clock Controller Interrupt routine 00097 * @param None 00098 * @retval None 00099 */ 00100 INTERRUPT_HANDLER(CLK_IRQHandler, 2) 00101 { 00102 /* In order to detect unexpected events during development, 00103 it is recommended to set a breakpoint on the following instruction. 00104 */ 00105 } 00106 00107 /** 00108 * @brief External Interrupt PORTA Interrupt routine 00109 * @param None 00110 * @retval None 00111 */ 00112 INTERRUPT_HANDLER(EXTI_PORTA_IRQHandler, 3) 00113 { 00114 /* In order to detect unexpected events during development, 00115 it is recommended to set a breakpoint on the following instruction. 00116 */ 00117 } 00118 00119 /** 00120 * @brief External Interrupt PORTB Interrupt routine 00121 * @param None 00122 * @retval None 00123 */ 00124 INTERRUPT_HANDLER(EXTI_PORTB_IRQHandler, 4) 00125 { 00126 /* joystick right */ 00127 if(STM_EVAL_PBGetState(BUTTON_RIGHT) == 0x00) 00128 { 00129 OscillatorStatus = 0x00; 00130 } 00131 /* joystick up */ 00132 if(STM_EVAL_PBGetState(BUTTON_UP) == 0x00) 00133 { 00134 OscillatorStatus = 0x01; 00135 } 00136 /* joystick down */ 00137 if(STM_EVAL_PBGetState(BUTTON_DOWN) == 0x00) 00138 { 00139 OscillatorStatus = 0x02; 00140 } 00141 } 00142 00143 /** 00144 * @brief External Interrupt PORTC Interrupt routine 00145 * @param None 00146 * @retval None 00147 */ 00148 INTERRUPT_HANDLER(EXTI_PORTC_IRQHandler, 5) 00149 { 00150 /* In order to detect unexpected events during development, 00151 it is recommended to set a breakpoint on the following instruction. 00152 */ 00153 } 00154 00155 /** 00156 * @brief External Interrupt PORTD Interrupt routine 00157 * @param None 00158 * @retval None 00159 */ 00160 INTERRUPT_HANDLER(EXTI_PORTD_IRQHandler, 6) 00161 { 00162 /* In order to detect unexpected events during development, 00163 it is recommended to set a breakpoint on the following instruction. 00164 */ 00165 } 00166 00167 /** 00168 * @brief External Interrupt PORTE Interrupt routine 00169 * @param None 00170 * @retval None 00171 */ 00172 INTERRUPT_HANDLER(EXTI_PORTE_IRQHandler, 7) 00173 { 00174 /* In order to detect unexpected events during development, 00175 it is recommended to set a breakpoint on the following instruction. 00176 */ 00177 } 00178 #ifdef STM8S903 00179 /** 00180 * @brief External Interrupt PORTF Interrupt routine 00181 * @param None 00182 * @retval None 00183 */ 00184 INTERRUPT_HANDLER(EXTI_PORTF_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 #endif /*STM8S903*/ 00191 00192 #if defined (STM8S208) || defined (STM8AF52Ax) 00193 /** 00194 * @brief CAN RX Interrupt routine. 00195 * @param None 00196 * @retval None 00197 */ 00198 INTERRUPT_HANDLER(CAN_RX_IRQHandler, 8) 00199 { 00200 /* In order to detect unexpected events during development, 00201 it is recommended to set a breakpoint on the following instruction. 00202 */ 00203 } 00204 00205 /** 00206 * @brief CAN TX Interrupt routine 00207 * @param None 00208 * @retval None 00209 */ 00210 INTERRUPT_HANDLER(CAN_TX_IRQHandler, 9) 00211 { 00212 /* In order to detect unexpected events during development, 00213 it is recommended to set a breakpoint on the following instruction. 00214 */ 00215 } 00216 #endif /*STM8S208 || STM8AF52Ax */ 00217 00218 /** 00219 * @brief SPI Interrupt routine 00220 * @param None 00221 * @retval None 00222 */ 00223 INTERRUPT_HANDLER(SPI_IRQHandler, 10) 00224 { 00225 /* In order to detect unexpected events during development, 00226 it is recommended to set a breakpoint on the following instruction. 00227 */ 00228 } 00229 00230 /** 00231 * @brief Timer1 Update/Overflow/Trigger/Break Interrupt routine 00232 * @param None 00233 * @retval None 00234 */ 00235 INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_BRK_IRQHandler, 11) 00236 { 00237 /* In order to detect unexpected events during development, 00238 it is recommended to set a breakpoint on the following instruction. 00239 */ 00240 } 00241 00242 /** 00243 * @brief Timer1 Capture/Compare Interrupt routine 00244 * @param None 00245 * @retval None 00246 */ 00247 INTERRUPT_HANDLER(TIM1_CAP_COM_IRQHandler, 12) 00248 { 00249 /* In order to detect unexpected events during development, 00250 it is recommended to set a breakpoint on the following instruction. 00251 */ 00252 } 00253 00254 #ifdef STM8S903 00255 /** 00256 * @brief Timer5 Update/Overflow/Break/Trigger Interrupt routine 00257 * @param None 00258 * @retval None 00259 */ 00260 INTERRUPT_HANDLER(TIM5_UPD_OVF_BRK_TRG_IRQHandler, 13) 00261 { 00262 /* In order to detect unexpected events during development, 00263 it is recommended to set a breakpoint on the following instruction. 00264 */ 00265 } 00266 /** 00267 * @brief Timer5 Capture/Compare Interrupt routine 00268 * @param None 00269 * @retval None 00270 */ 00271 INTERRUPT_HANDLER(TIM5_CAP_COM_IRQHandler, 14) 00272 { 00273 /* In order to detect unexpected events during development, 00274 it is recommended to set a breakpoint on the following instruction. 00275 */ 00276 } 00277 00278 #else /*STM8S208, STM8S207, STM8S105 or STM8S103 or STM8AF62Ax or STM8AF52Ax or STM8AF626x */ 00279 /** 00280 * @brief Timer2 Update/Overflow/Break Interrupt routine 00281 * @param None 00282 * @retval None 00283 */ 00284 INTERRUPT_HANDLER(TIM2_UPD_OVF_BRK_IRQHandler, 13) 00285 { 00286 /* In order to detect unexpected events during development, 00287 it is recommended to set a breakpoint on the following instruction. 00288 */ 00289 } 00290 00291 /** 00292 * @brief Timer2 Capture/Compare Interrupt routine 00293 * @param None 00294 * @retval None 00295 */ 00296 INTERRUPT_HANDLER(TIM2_CAP_COM_IRQHandler, 14) 00297 { 00298 /* In order to detect unexpected events during development, 00299 it is recommended to set a breakpoint on the following instruction. 00300 */ 00301 } 00302 #endif /*STM8S903*/ 00303 00304 #if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S105) || \ 00305 defined(STM8S005) || defined (STM8AF62Ax) || defined (STM8AF52Ax) || defined (STM8AF626x) 00306 /** 00307 * @brief Timer3 Update/Overflow/Break Interrupt routine. 00308 * @param None 00309 * @retval None 00310 */ 00311 INTERRUPT_HANDLER(TIM3_UPD_OVF_BRK_IRQHandler, 15) 00312 { 00313 /* In order to detect unexpected events during development, 00314 it is recommended to set a breakpoint on the following instruction. 00315 */ 00316 } 00317 00318 /** 00319 * @brief Timer3 Capture/Compare Interrupt routine 00320 * @param None 00321 * @retval None 00322 */ 00323 INTERRUPT_HANDLER(TIM3_CAP_COM_IRQHandler, 16) 00324 { 00325 /* In order to detect unexpected events during development, 00326 it is recommended to set a breakpoint on the following instruction. 00327 */ 00328 } 00329 #endif /*STM8S208, STM8S207 or STM8S105 or STM8AF62Ax or STM8AF52Ax or STM8AF626x */ 00330 00331 #if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S103) || \ 00332 defined(STM8S003) || defined (STM8AF62Ax) || defined (STM8AF52Ax) || defined (STM8S903) 00333 /** 00334 * @brief UART1 TX Interrupt routine 00335 * @param None 00336 * @retval None 00337 */ 00338 INTERRUPT_HANDLER(UART1_TX_IRQHandler, 17) 00339 { 00340 /* In order to detect unexpected events during development, 00341 it is recommended to set a breakpoint on the following instruction. 00342 */ 00343 } 00344 00345 /** 00346 * @brief UART1 RX Interrupt routine 00347 * @param None 00348 * @retval None 00349 */ 00350 INTERRUPT_HANDLER(UART1_RX_IRQHandler, 18) 00351 { 00352 /* In order to detect unexpected events during development, 00353 it is recommended to set a breakpoint on the following instruction. 00354 */ 00355 } 00356 #endif /*STM8S105*/ 00357 00358 /** 00359 * @brief I2C Interrupt routine 00360 * @param None 00361 * @retval None 00362 */ 00363 INTERRUPT_HANDLER(I2C_IRQHandler, 19) 00364 { 00365 /* In order to detect unexpected events during development, 00366 it is recommended to set a breakpoint on the following instruction. 00367 */ 00368 } 00369 00370 #if defined(STM8S105) || defined(STM8S005) || defined (STM8AF626x) 00371 /** 00372 * @brief UART2 TX interrupt routine. 00373 * @param None 00374 * @retval None 00375 */ 00376 INTERRUPT_HANDLER(UART2_TX_IRQHandler, 20) 00377 { 00378 /* In order to detect unexpected events during development, 00379 it is recommended to set a breakpoint on the following instruction. 00380 */ 00381 } 00382 00383 /** 00384 * @brief UART2 RX interrupt routine. 00385 * @param None 00386 * @retval None 00387 */ 00388 INTERRUPT_HANDLER(UART2_RX_IRQHandler, 21) 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 #endif /* STM8S105*/ 00395 00396 #if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax) 00397 /** 00398 * @brief UART3 TX interrupt routine. 00399 * @param None 00400 * @retval None 00401 */ 00402 INTERRUPT_HANDLER(UART3_TX_IRQHandler, 20) 00403 { 00404 /* In order to detect unexpected events during development, 00405 it is recommended to set a breakpoint on the following instruction. 00406 */ 00407 } 00408 00409 /** 00410 * @brief UART3 RX interrupt routine. 00411 * @param None 00412 * @retval None 00413 */ 00414 INTERRUPT_HANDLER(UART3_RX_IRQHandler, 21) 00415 { 00416 /* In order to detect unexpected events during development, 00417 it is recommended to set a breakpoint on the following instruction. 00418 */ 00419 } 00420 #endif /*STM8S208 or STM8S207 or STM8AF52Ax or STM8AF62Ax */ 00421 00422 #if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax) 00423 /** 00424 * @brief ADC2 interrupt routine. 00425 * @param None 00426 * @retval None 00427 */ 00428 INTERRUPT_HANDLER(ADC2_IRQHandler, 22) 00429 { 00430 00431 /* In order to detect unexpected events during development, 00432 it is recommended to set a breakpoint on the following instruction. 00433 */ 00434 return; 00435 00436 } 00437 #else /*STM8S105, STM8S103 or STM8S903 or STM8AF626x */ 00438 /** 00439 * @brief ADC1 interrupt routine. 00440 * @param None 00441 * @retval None 00442 */ 00443 INTERRUPT_HANDLER(ADC1_IRQHandler, 22) 00444 { 00445 00446 /* In order to detect unexpected events during development, 00447 it is recommended to set a breakpoint on the following instruction. 00448 */ 00449 return; 00450 00451 } 00452 #endif /*STM8S208 or STM8S207 or STM8AF52Ax or STM8AF62Ax */ 00453 00454 #ifdef STM8S903 00455 /** 00456 * @brief Timer6 Update/Overflow/Trigger Interrupt routine 00457 * @param None 00458 * @retval None 00459 */ 00460 INTERRUPT_HANDLER(TIM6_UPD_OVF_TRG_IRQHandler, 23) 00461 { 00462 /* In order to detect unexpected events during development, 00463 it is recommended to set a breakpoint on the following instruction. 00464 */ 00465 } 00466 #else /*STM8S208, STM8S207, STM8S105 or STM8S103 or STM8AF62Ax or STM8AF52Ax or STM8AF626x */ 00467 /** 00468 * @brief Timer4 Update/Overflow Interrupt routine 00469 * @param None 00470 * @retval None 00471 */ 00472 INTERRUPT_HANDLER(TIM4_UPD_OVF_IRQHandler, 23) 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 #endif /*STM8S903*/ 00479 00480 /** 00481 * @brief Eeprom EEC Interrupt routine 00482 * @param None 00483 * @retval None 00484 */ 00485 INTERRUPT_HANDLER(EEPROM_EEC_IRQHandler, 24) 00486 { 00487 /* In order to detect unexpected events during development, 00488 it is recommended to set a breakpoint on the following instruction. 00489 */ 00490 } 00491 00492 /** 00493 * @} 00494 */ 00495 00496 00497 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/