STM8S/A Standard Peripherals Firmware Library
|
STM8S_StdPeriph_Examples/RST/RST_IllegalOpcode/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 This file contains all the interrupt 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 typedef void (*Function_Pointer)(void); 00033 00034 /* Private define ------------------------------------------------------------*/ 00035 /* Private macro -------------------------------------------------------------*/ 00036 /* Private variables ---------------------------------------------------------*/ 00037 /* Private function prototypes -----------------------------------------------*/ 00038 /* Private functions ---------------------------------------------------------*/ 00039 00040 /* Public functions ----------------------------------------------------------*/ 00041 00042 /** @addtogroup RST_IllegalOpcode 00043 * @{ 00044 */ 00045 #ifdef _COSMIC_ 00046 /** 00047 * @brief Dummy interrupt routine 00048 * @param None 00049 * @retval None 00050 */ 00051 INTERRUPT_HANDLER(NonHandledInterrupt, 25) 00052 { 00053 /* In order to detect unexpected events during development, 00054 it is recommended to set a breakpoint on the following instruction. 00055 */ 00056 } 00057 #endif /*_COSMIC_*/ 00058 00059 /** 00060 * @brief TRAP interrupt routine 00061 * @param None 00062 * @retval None 00063 */ 00064 INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler) 00065 { 00066 /* In order to detect unexpected events during development, 00067 it is recommended to set a breakpoint on the following instruction. 00068 */ 00069 } 00070 /** 00071 * @brief Top Level Interrupt routine. 00072 * @param None 00073 * @retval None 00074 */ 00075 INTERRUPT_HANDLER(TLI_IRQHandler, 0) 00076 { 00077 /* In order to detect unexpected events during development, 00078 it is recommended to set a breakpoint on the following instruction. 00079 */ 00080 } 00081 00082 /** 00083 * @brief Auto Wake Up Interrupt routine. 00084 * @param None 00085 * @retval None 00086 */ 00087 INTERRUPT_HANDLER(AWU_IRQHandler, 1) 00088 { 00089 /* In order to detect unexpected events during development, 00090 it is recommended to set a breakpoint on the following instruction. 00091 */ 00092 } 00093 00094 /** 00095 * @brief Clock Controller Interrupt routine. 00096 * @param None 00097 * @retval None 00098 */ 00099 INTERRUPT_HANDLER(CLK_IRQHandler, 2) 00100 { 00101 /* In order to detect unexpected events during development, 00102 it is recommended to set a breakpoint on the following instruction. 00103 */ 00104 } 00105 00106 /** 00107 * @brief External Interrupt PORTA Interrupt routine. 00108 * @param None 00109 * @retval None 00110 */ 00111 INTERRUPT_HANDLER(EXTI_PORTA_IRQHandler, 3) 00112 { 00113 /* In order to detect unexpected events during development, 00114 it is recommended to set a breakpoint on the following instruction. 00115 */ 00116 } 00117 00118 /** 00119 * @brief External Interrupt PORTB Interrupt routine. 00120 * @param None 00121 * @retval None 00122 */ 00123 INTERRUPT_HANDLER(EXTI_PORTB_IRQHandler, 4) 00124 { 00125 /* In order to detect unexpected events during development, 00126 it is recommended to set a breakpoint on the following instruction. 00127 */ 00128 } 00129 00130 /** 00131 * @brief External Interrupt PORTC Interrupt routine. 00132 * @param None 00133 * @retval None 00134 */ 00135 INTERRUPT_HANDLER(EXTI_PORTC_IRQHandler, 5) 00136 { 00137 Function_Pointer Jump_Function; 00138 /* Jump to the illegal opcode address */ 00139 Jump_Function = (Function_Pointer) 0x9FFF; 00140 Jump_Function(); 00141 } 00142 00143 /** 00144 * @brief External Interrupt PORTD Interrupt routine. 00145 * @param None 00146 * @retval None 00147 */ 00148 INTERRUPT_HANDLER(EXTI_PORTD_IRQHandler, 6) 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 PORTE Interrupt routine. 00157 * @param None 00158 * @retval None 00159 */ 00160 INTERRUPT_HANDLER(EXTI_PORTE_IRQHandler, 7) 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 #ifdef STM8S903 00167 /** 00168 * @brief External Interrupt PORTF Interrupt routine. 00169 * @param None 00170 * @retval None 00171 */ 00172 INTERRUPT_HANDLER(EXTI_PORTF_IRQHandler, 8) 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 #endif /*STM8S903*/ 00179 00180 #ifdef STM8S208 00181 /** 00182 * @brief CAN RX Interrupt routine. 00183 * @param None 00184 * @retval None 00185 */ 00186 INTERRUPT_HANDLER(CAN_RX_IRQHandler, 8) 00187 { 00188 /* In order to detect unexpected events during development, 00189 it is recommended to set a breakpoint on the following instruction. 00190 */ 00191 } 00192 00193 /** 00194 * @brief CAN TX Interrupt routine. 00195 * @param None 00196 * @retval None 00197 */ 00198 INTERRUPT_HANDLER(CAN_TX_IRQHandler, 9) 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 #endif /*STM8S208 || STM8AF52Ax */ 00205 00206 /** 00207 * @brief SPI Interrupt routine. 00208 * @param None 00209 * @retval None 00210 */ 00211 INTERRUPT_HANDLER(SPI_IRQHandler, 10) 00212 { 00213 /* In order to detect unexpected events during development, 00214 it is recommended to set a breakpoint on the following instruction. 00215 */ 00216 } 00217 00218 /** 00219 * @brief Timer1 Update/Overflow/Trigger/Break Interrupt routine. 00220 * @param None 00221 * @retval None 00222 */ 00223 INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_BRK_IRQHandler, 11) 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 Capture/Compare Interrupt routine. 00232 * @param None 00233 * @retval None 00234 */ 00235 INTERRUPT_HANDLER(TIM1_CAP_COM_IRQHandler, 12) 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 #ifdef STM8S903 00243 /** 00244 * @brief Timer5 Update/Overflow/Break/Trigger Interrupt routine. 00245 * @param None 00246 * @retval None 00247 */ 00248 INTERRUPT_HANDLER(TIM5_UPD_OVF_BRK_TRG_IRQHandler, 13) 00249 { 00250 /* In order to detect unexpected events during development, 00251 it is recommended to set a breakpoint on the following instruction. 00252 */ 00253 } 00254 /** 00255 * @brief Timer5 Capture/Compare Interrupt routine. 00256 * @param None 00257 * @retval None 00258 */ 00259 INTERRUPT_HANDLER(TIM5_CAP_COM_IRQHandler, 14) 00260 { 00261 /* In order to detect unexpected events during development, 00262 it is recommended to set a breakpoint on the following instruction. 00263 */ 00264 } 00265 00266 #else /*STM8S208, STM8S207, STM8S105 or STM8S103 or STM8AF62Ax or STM8AF52Ax or STM8AF626x */ 00267 /** 00268 * @brief Timer2 Update/Overflow/Break Interrupt routine. 00269 * @param None 00270 * @retval None 00271 */ 00272 INTERRUPT_HANDLER(TIM2_UPD_OVF_BRK_IRQHandler, 13) 00273 { 00274 /* In order to detect unexpected events during development, 00275 it is recommended to set a breakpoint on the following instruction. 00276 */ 00277 } 00278 00279 /** 00280 * @brief Timer2 Capture/Compare Interrupt routine. 00281 * @param None 00282 * @retval None 00283 */ 00284 INTERRUPT_HANDLER(TIM2_CAP_COM_IRQHandler, 14) 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 #endif /*STM8S903*/ 00291 00292 #if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S105) || \ 00293 defined(STM8S005) || defined (STM8AF62Ax) || defined (STM8AF52Ax) || defined (STM8AF626x) 00294 /** 00295 * @brief Timer3 Update/Overflow/Break Interrupt routine. 00296 * @param None 00297 * @retval None 00298 */ 00299 INTERRUPT_HANDLER(TIM3_UPD_OVF_BRK_IRQHandler, 15) 00300 { 00301 /* In order to detect unexpected events during development, 00302 it is recommended to set a breakpoint on the following instruction. 00303 */ 00304 } 00305 00306 /** 00307 * @brief Timer3 Capture/Compare Interrupt routine. 00308 * @param None 00309 * @retval None 00310 */ 00311 INTERRUPT_HANDLER(TIM3_CAP_COM_IRQHandler, 16) 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 #endif /*STM8S208, STM8S207 or STM8S105 or STM8AF62Ax or STM8AF52Ax or STM8AF626x */ 00318 00319 #if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S103) || \ 00320 defined(STM8S003) || defined (STM8AF62Ax) || defined (STM8AF52Ax) || defined (STM8S903) 00321 /** 00322 * @brief UART1 TX Interrupt routine. 00323 * @param None 00324 * @retval None 00325 */ 00326 INTERRUPT_HANDLER(UART1_TX_IRQHandler, 17) 00327 { 00328 /* In order to detect unexpected events during development, 00329 it is recommended to set a breakpoint on the following instruction. 00330 */ 00331 } 00332 00333 /** 00334 * @brief UART1 RX Interrupt routine. 00335 * @param None 00336 * @retval None 00337 */ 00338 INTERRUPT_HANDLER(UART1_RX_IRQHandler, 18) 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 #endif /*STM8S105*/ 00345 00346 /** 00347 * @brief I2C Interrupt routine. 00348 * @param None 00349 * @retval None 00350 */ 00351 INTERRUPT_HANDLER(I2C_IRQHandler, 19) 00352 { 00353 /* In order to detect unexpected events during development, 00354 it is recommended to set a breakpoint on the following instruction. 00355 */ 00356 } 00357 00358 #if defined(STM8S105) || defined(STM8S005) || defined (STM8AF626x) 00359 /** 00360 * @brief UART2 TX interrupt routine. 00361 * @param None 00362 * @retval None 00363 */ 00364 INTERRUPT_HANDLER(UART2_TX_IRQHandler, 20) 00365 { 00366 /* In order to detect unexpected events during development, 00367 it is recommended to set a breakpoint on the following instruction. 00368 */ 00369 } 00370 00371 /** 00372 * @brief UART2 RX interrupt routine. 00373 * @param None 00374 * @retval None 00375 */ 00376 INTERRUPT_HANDLER(UART2_RX_IRQHandler, 21) 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 #endif /* STM8S105*/ 00383 00384 #if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax) 00385 /** 00386 * @brief UART3 TX interrupt routine. 00387 * @param None 00388 * @retval None 00389 */ 00390 INTERRUPT_HANDLER(UART3_TX_IRQHandler, 20) 00391 { 00392 /* In order to detect unexpected events during development, 00393 it is recommended to set a breakpoint on the following instruction. 00394 */ 00395 } 00396 00397 /** 00398 * @brief UART3 RX interrupt routine. 00399 * @param None 00400 * @retval None 00401 */ 00402 INTERRUPT_HANDLER(UART3_RX_IRQHandler, 21) 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 #endif /*STM8S208 or STM8S207 or STM8AF52Ax or STM8AF62Ax */ 00409 00410 #if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax) 00411 /** 00412 * @brief ADC2 interrupt routine. 00413 * @param None 00414 * @retval None 00415 */ 00416 INTERRUPT_HANDLER(ADC2_IRQHandler, 22) 00417 { 00418 00419 /* In order to detect unexpected events during development, 00420 it is recommended to set a breakpoint on the following instruction. 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 } 00436 #endif /*STM8S208 or STM8S207 or STM8AF52Ax or STM8AF62Ax */ 00437 00438 #ifdef STM8S903 00439 /** 00440 * @brief Timer6 Update/Overflow/Trigger Interrupt routine. 00441 * @param None 00442 * @retval None 00443 */ 00444 INTERRUPT_HANDLER(TIM6_UPD_OVF_TRG_IRQHandler, 23) 00445 { 00446 /* In order to detect unexpected events during development, 00447 it is recommended to set a breakpoint on the following instruction. 00448 */ 00449 } 00450 #else /*STM8S208, STM8S207, STM8S105 or STM8S103 or STM8AF62Ax or STM8AF52Ax or STM8AF626x */ 00451 /** 00452 * @brief Timer4 Update/Overflow Interrupt routine. 00453 * @param None 00454 * @retval None 00455 */ 00456 INTERRUPT_HANDLER(TIM4_UPD_OVF_IRQHandler, 23) 00457 { 00458 /* In order to detect unexpected events during development, 00459 it is recommended to set a breakpoint on the following instruction. 00460 */ 00461 } 00462 #endif /*STM8S903*/ 00463 00464 /** 00465 * @brief Eeprom EEC Interrupt routine. 00466 * @param None 00467 * @retval None 00468 */ 00469 INTERRUPT_HANDLER(EEPROM_EEC_IRQHandler, 24) 00470 { 00471 /* In order to detect unexpected events during development, 00472 it is recommended to set a breakpoint on the following instruction. 00473 */ 00474 } 00475 00476 /** 00477 * @} 00478 */ 00479 00480 00481 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/