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

STM8S/A

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

 

 

 

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