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

STM8S/A

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

 

 

 

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