STM8S/A Standard Peripherals Firmware Library: stm8s_it.c Source File

STM8S/A

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

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com