STM32F10x_StdPeriph_Examples/NVIC/IRQ_Channels/stm32f10x_it.c

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    NVIC/IRQ_Channels/stm32f10x_it.c 
00004   * @author  MCD Application Team
00005   * @version V3.4.0
00006   * @date    10/15/2010
00007   * @brief   Main Interrupt Service Routines.
00008   *          This file provides template for all exceptions handler and 
00009   *          peripherals interrupt service routine.
00010   ******************************************************************************
00011   * @copy
00012   *
00013   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00014   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00015   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00016   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00017   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00018   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00019   *
00020   * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
00021   */
00022 
00023 /* Includes ------------------------------------------------------------------*/
00024 #include "stm32f10x_it.h"
00025 #include "stm32_eval.h"
00026 
00027 /** @addtogroup STM32F10x_StdPeriph_Examples
00028   * @{
00029   */
00030 
00031 /** @addtogroup NVIC_IRQ_Channels
00032   * @{
00033   */ 
00034 
00035 /* Private typedef -----------------------------------------------------------*/
00036 /* Private define ------------------------------------------------------------*/
00037 /* Private macro -------------------------------------------------------------*/
00038 /* Private variables ---------------------------------------------------------*/
00039 /* Private function prototypes -----------------------------------------------*/
00040 /* Private functions ---------------------------------------------------------*/
00041 
00042 /******************************************************************************/
00043 /*            Cortex-M3 Processor Exceptions Handlers                         */
00044 /******************************************************************************/
00045 
00046 /**
00047   * @brief  This function handles NMI exception.
00048   * @param  None
00049   * @retval None
00050   */
00051 void NMI_Handler(void)
00052 {
00053 }
00054 
00055 /**
00056   * @brief  This function handles Hard Fault exception.
00057   * @param  None
00058   * @retval None
00059   */
00060 void HardFault_Handler(void)
00061 {
00062   /* Go to infinite loop when Hard Fault exception occurs */
00063   while (1)
00064   {
00065   }
00066 }
00067 
00068 /**
00069   * @brief  This function handles Memory Manage exception.
00070   * @param  None
00071   * @retval None
00072   */
00073 void MemManage_Handler(void)
00074 {
00075   /* Go to infinite loop when Memory Manage exception occurs */
00076   while (1)
00077   {
00078   }
00079 }
00080 
00081 /**
00082   * @brief  This function handles Bus Fault exception.
00083   * @param  None
00084   * @retval None
00085   */
00086 void BusFault_Handler(void)
00087 {
00088   /* Go to infinite loop when Bus Fault exception occurs */
00089   while (1)
00090   {
00091   }
00092 }
00093 
00094 /**
00095   * @brief  This function handles Usage Fault exception.
00096   * @param  None
00097   * @retval None
00098   */
00099 void UsageFault_Handler(void)
00100 {
00101   /* Go to infinite loop when Usage Fault exception occurs */
00102   while (1)
00103   {
00104   }
00105 }
00106 
00107 /**
00108   * @brief  This function handles SVCall exception.
00109   * @param  None
00110   * @retval None
00111   */
00112 void SVC_Handler(void)
00113 {
00114 }
00115 
00116 /**
00117   * @brief  This function handles Debug Monitor exception.
00118   * @param  None
00119   * @retval None
00120   */
00121 void DebugMon_Handler(void)
00122 {
00123 }
00124 
00125 /**
00126   * @brief  This function handles PendSV_Handler exception.
00127   * @param  None
00128   * @retval None
00129   */
00130 void PendSV_Handler(void)
00131 {
00132 }
00133 
00134 /**
00135   * @brief  This function handles SysTick Handler.
00136   * @param  None
00137   * @retval None
00138   */
00139 void SysTick_Handler(void)
00140 {
00141 }
00142 
00143 /******************************************************************************/
00144 /*            STM32F10x Peripherals Interrupt Handlers                        */
00145 /******************************************************************************/
00146 
00147 /**
00148   * @brief  This function handles TIM2 global interrupt request.
00149   * @param  None
00150   * @retval None
00151   */
00152 void TIM2_IRQHandler(void)
00153 {
00154   /* Clear TIM2 update interrupt */
00155   TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
00156   
00157   /* Toggle LED1 */
00158   STM_EVAL_LEDToggle(LED1);
00159 }
00160 
00161 /**
00162   * @brief  This function handles TIM3 global interrupt request.
00163   * @param  None
00164   * @retval None
00165   */
00166 void TIM3_IRQHandler(void)
00167 {
00168   /* Clear TIM3 update interrupt */
00169   TIM_ClearITPendingBit(TIM3, TIM_IT_Update);
00170   
00171   /* Toggle LED2 */
00172   STM_EVAL_LEDToggle(LED2);
00173 }
00174 
00175 /**
00176   * @brief  This function handles TIM4 global interrupt request.
00177   * @param  None
00178   * @retval None
00179   */
00180 void TIM4_IRQHandler(void)
00181 {
00182   /* Clear TIM4 update interrupt */
00183   TIM_ClearITPendingBit(TIM4, TIM_IT_Update);
00184   
00185   /* Toggle LED3 */
00186   STM_EVAL_LEDToggle(LED3);
00187 }
00188 
00189 /******************************************************************************/
00190 /*                 STM32F10x Peripherals Interrupt Handlers                   */
00191 /*  Add here the Interrupt Handler for the used peripheral(s) (PPP), for the  */
00192 /*  available peripheral interrupt handler's name please refer to the startup */
00193 /*  file (startup_stm32f10x_xx.s).                                            */
00194 /******************************************************************************/
00195 
00196 /**
00197   * @brief  This function handles PPP interrupt request.
00198   * @param  None
00199   * @retval None
00200   */
00201 /*void PPP_IRQHandler(void)
00202 {
00203 }*/
00204 
00205 /**
00206   * @}
00207   */
00208 
00209 /**
00210   * @}
00211   */
00212 
00213 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32