2009-07-28 07:28:26 +08:00
|
|
|
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
|
|
|
* File Name : stm32f10x_it.c
|
|
|
|
* Author : MCD Application Team
|
|
|
|
* Version : V1.1.2
|
|
|
|
* Date : 09/22/2008
|
|
|
|
* Description : Main Interrupt Service Routines.
|
|
|
|
* This file provides template for all exceptions handler
|
|
|
|
* and peripherals interrupt service routine.
|
|
|
|
********************************************************************************
|
|
|
|
* THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
|
|
|
|
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include <serial.h>
|
2009-12-01 23:31:48 +08:00
|
|
|
#include "board.h"
|
2009-07-28 07:28:26 +08:00
|
|
|
|
|
|
|
/* Private typedef -----------------------------------------------------------*/
|
|
|
|
/* Private define ------------------------------------------------------------*/
|
|
|
|
/* Private macro -------------------------------------------------------------*/
|
|
|
|
/* Private variables ---------------------------------------------------------*/
|
|
|
|
/* Private function prototypes -----------------------------------------------*/
|
|
|
|
/* Private functions ---------------------------------------------------------*/
|
|
|
|
|
|
|
|
extern void rt_hw_timer_handler(void);
|
|
|
|
extern void rt_hw_interrupt_thread_switch(void);
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : NMIException
|
|
|
|
* Description : This function handles NMI exception.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void NMIException(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : HardFaultException
|
|
|
|
* Description : This function handles Hard Fault exception.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void HardFaultException(void)
|
|
|
|
{
|
2009-09-03 12:59:15 +08:00
|
|
|
/* Go to infinite loop when Hard Fault exception occurs */
|
|
|
|
rt_kprintf("hard fault exception\n");
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
}
|
2009-07-28 07:28:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : MemManageException
|
|
|
|
* Description : This function handles Memory Manage exception.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void MemManageException(void)
|
|
|
|
{
|
2009-09-03 12:59:15 +08:00
|
|
|
/* Go to infinite loop when Memory Manage exception occurs */
|
|
|
|
rt_kprintf("memory manage exception\n");
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
}
|
2009-07-28 07:28:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : BusFaultException
|
|
|
|
* Description : This function handles Bus Fault exception.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void BusFaultException(void)
|
|
|
|
{
|
2009-09-03 12:59:15 +08:00
|
|
|
/* Go to infinite loop when Bus Fault exception occurs */
|
|
|
|
rt_kprintf("bus fault exception\n");
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
}
|
2009-07-28 07:28:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : UsageFaultException
|
|
|
|
* Description : This function handles Usage Fault exception.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void UsageFaultException(void)
|
|
|
|
{
|
2009-09-03 12:59:15 +08:00
|
|
|
/* Go to infinite loop when Usage Fault exception occurs */
|
|
|
|
rt_kprintf("usage fault exception\n");
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
}
|
2009-07-28 07:28:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* 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 : SysTickHandler
|
|
|
|
* Description : This function handles SysTick Handler.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void SysTickHandler(void)
|
|
|
|
{
|
2009-09-03 12:59:15 +08:00
|
|
|
/* handle os tick */
|
|
|
|
rt_hw_timer_handler();
|
2009-07-28 07:28:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* 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)
|
|
|
|
{
|
2009-09-03 12:59:15 +08:00
|
|
|
if (RTC_GetITStatus(RTC_IT_SEC) != RESET)
|
2009-07-28 07:28:26 +08:00
|
|
|
{
|
2009-09-03 12:59:15 +08:00
|
|
|
/* Clear the RTC Second interrupt */
|
|
|
|
RTC_ClearITPendingBit(RTC_IT_SEC);
|
|
|
|
|
|
|
|
/* Wait until last write operation on RTC registers has finished */
|
|
|
|
RTC_WaitForLastTask();
|
|
|
|
|
|
|
|
/* Reset RTC Counter when Time is 23:59:59 */
|
|
|
|
if (RTC_GetCounter() == 0x00015180)
|
|
|
|
{
|
|
|
|
RTC_SetCounter(0x0);
|
|
|
|
/* Wait until last write operation on RTC registers has finished */
|
|
|
|
RTC_WaitForLastTask();
|
|
|
|
}
|
2009-07-28 07:28:26 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* 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)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* 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 : 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)
|
|
|
|
{
|
2010-01-19 22:31:11 +08:00
|
|
|
#ifdef RT_USING_LWIP
|
|
|
|
extern void rt_dm9000_isr(void);
|
|
|
|
|
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
|
|
|
|
|
|
|
rt_dm9000_isr();
|
|
|
|
|
|
|
|
/* Clear the Key Button EXTI line pending bit */
|
|
|
|
EXTI_ClearITPendingBit(EXTI_Line4);
|
|
|
|
|
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
|
|
|
rt_hw_interrupt_thread_switch();
|
|
|
|
#endif
|
2009-07-28 07:28:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : DMA1_Channel1_IRQHandler
|
|
|
|
* Description : This function handles DMA1 Channel 1 interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void DMA1_Channel1_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : DMA1_Channel2_IRQHandler
|
|
|
|
* Description : This function handles DMA1 Channel 2 interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void DMA1_Channel2_IRQHandler(void)
|
|
|
|
{
|
|
|
|
#ifdef RT_USING_UART3
|
2009-09-03 12:59:15 +08:00
|
|
|
extern struct rt_device uart3_device;
|
|
|
|
|
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
|
|
|
|
|
|
|
if (DMA_GetITStatus(DMA1_IT_TC2))
|
|
|
|
{
|
|
|
|
/* transmission complete, invoke serial dma tx isr */
|
|
|
|
rt_hw_serial_dma_tx_isr(&uart3_device);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* clear DMA flag */
|
|
|
|
DMA_ClearFlag(DMA1_FLAG_TC2 | DMA1_FLAG_TE2);
|
|
|
|
|
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
|
|
|
rt_hw_interrupt_thread_switch();
|
2009-07-28 07:28:26 +08:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : DMA1_Channel3_IRQHandler
|
|
|
|
* Description : This function handles DMA1 Channel 3 interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void DMA1_Channel3_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : DMA1_Channel4_IRQHandler
|
|
|
|
* Description : This function handles DMA1 Channel 4 interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void DMA1_Channel4_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : DMA1_Channel5_IRQHandler
|
|
|
|
* Description : This function handles DMA1 Channel 5 interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void DMA1_Channel5_IRQHandler(void)
|
|
|
|
{
|
2010-03-11 07:00:10 +08:00
|
|
|
#if !CODEC_USE_SPI3
|
2010-02-05 03:34:31 +08:00
|
|
|
extern void codec_dma_isr(void);
|
2009-08-19 21:14:50 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
2009-08-19 21:14:50 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
if (DMA_GetITStatus(DMA1_IT_TC5))
|
|
|
|
{
|
|
|
|
/* clear DMA flag */
|
|
|
|
DMA_ClearFlag(DMA1_FLAG_TC5 | DMA1_FLAG_TE5);
|
|
|
|
|
|
|
|
// rt_kprintf("DMA\n");
|
|
|
|
/* transmission complete, invoke serial dma tx isr */
|
2010-02-05 03:34:31 +08:00
|
|
|
codec_dma_isr();
|
2009-09-03 12:59:15 +08:00
|
|
|
}
|
2009-08-19 21:14:50 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
2010-03-11 07:00:10 +08:00
|
|
|
#endif
|
2009-07-28 07:28:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : DMA1_Channel6_IRQHandler
|
|
|
|
* Description : This function handles DMA1 Channel 6 interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void DMA1_Channel6_IRQHandler(void)
|
|
|
|
{
|
|
|
|
#ifdef RT_USING_UART2
|
2009-09-03 12:59:15 +08:00
|
|
|
extern struct rt_device uart2_device;
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* clear DMA flag */
|
|
|
|
DMA_ClearFlag(DMA1_FLAG_TC6 | DMA1_FLAG_TE6);
|
|
|
|
rt_hw_serial_dma_rx_isr(&uart2_device);
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
|
|
|
rt_hw_interrupt_thread_switch();
|
2009-07-28 07:28:26 +08:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : EXTI9_5_IRQHandler
|
|
|
|
* Description : This function handles External lines 9 to 5 interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void EXTI9_5_IRQHandler(void)
|
|
|
|
{
|
2009-10-08 21:47:58 +08:00
|
|
|
#ifdef RT_USING_LWIP
|
|
|
|
extern void rt_dm9000_isr(void);
|
|
|
|
|
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
|
|
|
|
|
|
|
rt_dm9000_isr();
|
|
|
|
|
|
|
|
/* Clear the Key Button EXTI line pending bit */
|
|
|
|
EXTI_ClearITPendingBit(EXTI_Line7);
|
|
|
|
|
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
|
|
|
rt_hw_interrupt_thread_switch();
|
|
|
|
#endif
|
2009-07-28 07:28:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : USART1_IRQHandler
|
|
|
|
* Description : This function handles USART1 global interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void USART1_IRQHandler(void)
|
|
|
|
{
|
|
|
|
#ifdef RT_USING_UART1
|
2009-09-03 12:59:15 +08:00
|
|
|
extern struct rt_device uart1_device;
|
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
rt_hw_serial_isr(&uart1_device);
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
|
|
|
rt_hw_interrupt_thread_switch();
|
2009-07-28 07:28:26 +08:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : USART2_IRQHandler
|
|
|
|
* Description : This function handles USART2 global interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void USART2_IRQHandler(void)
|
|
|
|
{
|
|
|
|
#ifdef RT_USING_UART2
|
2009-09-03 12:59:15 +08:00
|
|
|
extern struct rt_device uart2_device;
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
rt_hw_serial_isr(&uart2_device);
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
|
|
|
rt_hw_interrupt_thread_switch();
|
2009-07-28 07:28:26 +08:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : USART3_IRQHandler
|
|
|
|
* Description : This function handles USART3 global interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void USART3_IRQHandler(void)
|
|
|
|
{
|
|
|
|
#ifdef RT_USING_UART3
|
2009-09-03 12:59:15 +08:00
|
|
|
extern struct rt_device uart3_device;
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
rt_hw_serial_isr(&uart3_device);
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
|
|
|
rt_hw_interrupt_thread_switch();
|
2009-07-28 07:28:26 +08:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : EXTI15_10_IRQHandler
|
|
|
|
* Description : This function handles External lines 15 to 10 interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void EXTI15_10_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : RTCAlarm_IRQHandler
|
|
|
|
* Description : This function handles RTC Alarm interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void RTCAlarm_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : USBWakeUp_IRQHandler
|
|
|
|
* Description : This function handles USB WakeUp interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void USBWakeUp_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : TIM8_BRK_IRQHandler
|
|
|
|
* Description : This function handles TIM8 Break interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void TIM8_BRK_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : TIM8_UP_IRQHandler
|
|
|
|
* Description : This function handles TIM8 overflow and update interrupt
|
|
|
|
* request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void TIM8_UP_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : TIM8_TRG_COM_IRQHandler
|
|
|
|
* Description : This function handles TIM8 Trigger and commutation interrupts
|
|
|
|
* requests.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void TIM8_TRG_COM_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : TIM8_CC_IRQHandler
|
|
|
|
* Description : This function handles TIM8 capture compare interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void TIM8_CC_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : ADC3_IRQHandler
|
|
|
|
* Description : This function handles ADC3 global interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void ADC3_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : FSMC_IRQHandler
|
|
|
|
* Description : This function handles FSMC global interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void FSMC_IRQHandler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : SDIO_IRQHandler
|
|
|
|
* Description : This function handles SDIO global interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void SDIO_IRQHandler(void)
|
|
|
|
{
|
|
|
|
#ifdef RT_USING_DFS
|
2009-09-03 12:59:15 +08:00
|
|
|
extern int SD_ProcessIRQSrc(void);
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* Process All SDIO Interrupt Sources */
|
|
|
|
SD_ProcessIRQSrc();
|
2009-07-28 07:28:26 +08:00
|
|
|
|
2009-09-03 12:59:15 +08:00
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
|
|
|
rt_hw_interrupt_thread_switch();
|
2009-07-28 07:28:26 +08:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2010-03-11 07:00:10 +08:00
|
|
|
/*******************************************************************************
|
|
|
|
* Function Name : DMA2_Channel2_IRQHandler
|
|
|
|
* Description : This function handles DMA2 Channel 2 interrupt request.
|
|
|
|
* Input : None
|
|
|
|
* Output : None
|
|
|
|
* Return : None
|
|
|
|
*******************************************************************************/
|
|
|
|
void DMA2_Channel2_IRQHandler(void)
|
|
|
|
{
|
|
|
|
#if CODEC_USE_SPI3
|
|
|
|
extern void codec_dma_isr(void);
|
|
|
|
|
|
|
|
/* enter interrupt */
|
|
|
|
rt_interrupt_enter();
|
|
|
|
|
|
|
|
if (DMA_GetITStatus(DMA2_IT_TC2))
|
|
|
|
{
|
|
|
|
/* clear DMA flag */
|
|
|
|
DMA_ClearFlag(DMA2_FLAG_TC2 | DMA2_FLAG_TE2);
|
|
|
|
|
|
|
|
/* transmission complete, invoke serial dma tx isr */
|
|
|
|
codec_dma_isr();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* leave interrupt */
|
|
|
|
rt_interrupt_leave();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2010-02-02 03:47:12 +08:00
|
|
|
/* add on 2009-12-31 for usb */
|
2009-12-31 22:12:11 +08:00
|
|
|
extern void CTR_HP(void);
|
|
|
|
extern void USB_Istr(void);
|
|
|
|
void USB_HP_CAN1_TX_IRQHandler(void)
|
|
|
|
{
|
|
|
|
CTR_HP();
|
|
|
|
}
|
|
|
|
|
|
|
|
void USB_LP_CAN1_RX0_IRQHandler(void)
|
|
|
|
{
|
|
|
|
USB_Istr();
|
|
|
|
}
|
2010-02-02 03:47:12 +08:00
|
|
|
|
|
|
|
/* add on 2010-01-02 for remote */
|
|
|
|
extern void remote_isr(void);
|
|
|
|
void TIM5_IRQHandler(void)
|
|
|
|
{
|
|
|
|
remote_isr();
|
|
|
|
}
|