📄 stm32f10x_it.c
字号:
/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
* File Name : stm32f10x_it.c
* Author : MCD Application Team
* Date First Issued : 02/05/2007
* Description : Main Interrupt Service Routines.
* This file can be used to describe all the exceptions
* subroutines that may occur within user application.
* When an interrupt happens, the software will branch
* automatically to the corresponding routine.
* The following routines are all empty, user can write code
* for exceptions handlers and peripherals IRQ interrupts.
********************************************************************************
* History:
* 05/21/2007: V0.3
* 04/02/2007: V0.2
* 02/05/2007: V0.1
********************************************************************************
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_it.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/*******************************************************************************
* Function Name : NMIException
* Description : This function handles NMI exception.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void NMIException(void)
{
/* This interrupt is generated when HSE clock fails */
if (RCC_GetITStatus(RCC_IT_CSS) != RESET)
{/* At this stage: HSE, PLL are disabled (but no change on PLL config) and HSI
is selected as system clock source */
/* Enable HSE */
RCC_HSEConfig(RCC_HSE_ON);
/* Enable HSE Ready interrupt */
RCC_ITConfig(RCC_IT_HSERDY, ENABLE);
/* Enable PLL Ready interrupt */
RCC_ITConfig(RCC_IT_PLLRDY, ENABLE);
/* Clear Clock Security System interrupt pending bit */
RCC_ClearITPendingBit(RCC_IT_CSS);
/* Once HSE clock recover, the HSERDY interrupt is generated and in the RCC ISR
routine the system clock will be reconfigured to its previous state (before
HSE clock failure) */
}
}
/*******************************************************************************
* Function Name : HardFaultException
* Description : This function handles Hard Fault exception.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void HardFaultException(void)
{
}
/*******************************************************************************
* Function Name : MemManageException
* Description : This function handles Memory Manage exception.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void MemManageException(void)
{
}
/*******************************************************************************
* Function Name : BusFaultException
* Description : This function handles Bus Fault exception.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void BusFaultException(void)
{
}
/*******************************************************************************
* Function Name : UsageFaultException
* Description : This function handles Usage Fault exception.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void UsageFaultException(void)
{
}
/*******************************************************************************
* Function Name : DebugMonitor
* Description : This function handles Debug Monitor exception.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void DebugMonitor(void)
{
}
/*******************************************************************************
* Function Name : SVCHandler
* Description : This function handles SVCall exception.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void SVCHandler(void)
{
}
/*******************************************************************************
* Function Name : PendSVC
* Description : This function handles PendSVC exception.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void PendSVC(void)
{
}
/*******************************************************************************
* Function Name : SysTickHandler
* Description : This function handles SysTick Handler.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void SysTickHandler(void)
{
}
/*******************************************************************************
* Function Name : WWDG_IRQHandler
* Description : This function handles WWDG interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void WWDG_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : PVD_IRQHandler
* Description : This function handles PVD interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void PVD_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : TAMPER_IRQHandler
* Description : This function handles Tamper interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void TAMPER_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : RTC_IRQHandler
* Description : This function handles RTC global interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void RTC_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : FLASH_IRQHandler
* Description : This function handles Flash interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void FLASH_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : RCC_IRQHandler
* Description : This function handles RCC interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void RCC_IRQHandler(void)
{
if(RCC_GetITStatus(RCC_IT_HSERDY) != RESET)
{
/* Clear HSERDY interrupt pending bit */
RCC_ClearITPendingBit(RCC_IT_HSERDY);
/* Check if the HSE clock is still available */
if (RCC_GetFlagStatus(RCC_FLAG_HSERDY) != RESET)
{
/* Enable PLL: once the PLL is ready the PLLRDY interrupt is generated */
RCC_PLLCmd(ENABLE);
}
}
if(RCC_GetITStatus(RCC_IT_PLLRDY) != RESET)
{
/* Clear PLLRDY interrupt pending bit */
RCC_ClearITPendingBit(RCC_IT_PLLRDY);
/* Check if the PLL is still locked */
if (RCC_GetFlagStatus(RCC_FLAG_PLLRDY) != RESET)
{
/* Select PLL as system clock source */
RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);
}
}
}
/*******************************************************************************
* Function Name : EXTI0_IRQHandler
* Description : This function handles External interrupt Line 0 request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI0_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : EXTI1_IRQHandler
* Description : This function handles External interrupt Line 1 request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI1_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : EXTI2_IRQHandler
* Description : This function handles External interrupt Line 2 request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI2_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : EXTI3_IRQHandler
* Description : This function handles External interrupt Line 3 request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI3_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : EXTI4_IRQHandler
* Description : This function handles External interrupt Line 4 request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI4_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : DMAChannel1_IRQHandler
* Description : This function handles DMA Stream 1 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void DMAChannel1_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : DMAChannel2_IRQHandler
* Description : This function handles DMA Stream 2 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void DMAChannel2_IRQHandler(void)
{
}
/*******************************************************************************
* Function Name : DMAChannel3_IRQHandler
* Description : This function handles DMA Stream 3 interrupt request.
* Input : None
* Output : None
* Return : None
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -