/** ****************************************************************************** * @file TIM_TimeBase/stm32f4xx_it.c * @author MCD Application Team * @version V1.0.0 * @date 19-September-2011 * @brief Main Interrupt Service Routines. * This file provides template for all exceptions handler and peripherals * interrupt service routine. ****************************************************************************** * @attention * * 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. * *

© COPYRIGHT 2011 STMicroelectronics

****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "stm32f4xx.h" /* STM32F4xx Definitions */ #include "../Include/myGlobal_Vars.h" #include "../Include/myLcdText.h" #include "../Include/myDefinition.h" #include "../Include/myMotor.h" #include "../Include/myI2C.h" #include "../Include/myDelay.h" #include "../Include/effirof4_init.h" #include "../Include/stm32f4xx_it.h" #include "../Include/mySerial.h" #include "../Include/myADC.h" #include "../Include/MPU6050.h" #include "../Include/tm_stm32f4_usart.h" #include "../Include/tm_stm32f4_usart_dma.h" #include "../Include/myIMUDMP.h" #include "i2c.h" #include "gpio.h" #include "board-st_discovery.h" /** @addtogroup STM32F4_Discovery_Peripheral_Examples * @{ */ /** @addtogroup TIM_TimeBase * @{ */ /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ uint16_t capture = 0; extern __IO uint16_t CCR1_Val; extern __IO uint16_t CCR2_Val; extern __IO uint16_t CCR3_Val; extern __IO uint16_t CCR4_Val; union Data32Bit datapp; /* Private function prototypes -----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ /******************************************************************************/ /* Cortex-M4 Processor Exceptions Handlers */ /******************************************************************************/ /** * @brief This function handles NMI exception. * @param None * @retval None */ void NMI_Handler(void) { } /** * @brief This function handles Hard Fault exception. * @param None * @retval None */ void HardFault_Handler(void) { /* Go to infinite loop when Hard Fault exception occurs */ while (1) {} } /** * @brief This function handles Memory Manage exception. * @param None * @retval None */ void MemManage_Handler(void) { /* Go to infinite loop when Memory Manage exception occurs */ while (1) {} } /** * @brief This function handles Bus Fault exception. * @param None * @retval None */ void BusFault_Handler(void) { /* Go to infinite loop when Bus Fault exception occurs */ while (1) {} } /** * @brief This function handles Usage Fault exception. * @param None * @retval None */ void UsageFault_Handler(void) { /* Go to infinite loop when Usage Fault exception occurs */ while (1) {} } /** * @brief This function handles Debug Monitor exception. * @param None * @retval None */ void DebugMon_Handler(void) {} /** * @brief This function handles SVCall exception. * @param None * @retval None */ /* void SVC_Handler(void) {} */ /** * @brief This function handles PendSV_Handler exception. * @param None * @retval None */ /* void PendSV_Handler(void) {} */ /** * @brief This function handles SysTick Handler. * @param None * @retval None */ /* void SysTick_Handler(void) {Gticks++; //Buzzer_On; } */ /******************************************************************************/ /* STM32F4xx Peripherals Interrupt Handlers */ /******************************************************************************/ /** * @brief This function handles TIM3 global interrupt request. * @param None * @retval None */ void EXTI9_5_IRQHandler(void) { EXTI_ClearITPendingBit(EXTI_Line5); /* Data ready! */ gyro_data_ready_cb(); // Monitor6(0xFF); // Monitor6(0xFF); // datapp.df=Roll; // Monitor6(datapp.d8u[0]); // Monitor6(datapp.d8u[1]); // Monitor6(datapp.d8u[2]); // Monitor6(datapp.d8u[3]); // // datapp.df=Pitch; // Monitor6(datapp.d8u[0]); // Monitor6(datapp.d8u[1]); // Monitor6(datapp.d8u[2]); // Monitor6(datapp.d8u[3]); } void EXTI4_IRQHandler(void) { EXTI_ClearITPendingBit(EXTI_Line4); /* Data ready! */ gyro_data_ready_cb(); // Monitor6(0xFF); // Monitor6(0xFF); // // datapp.df=Roll; // Monitor6(datapp.d8u[0]); // Monitor6(datapp.d8u[1]); // Monitor6(datapp.d8u[2]); // Monitor6(datapp.d8u[3]); // // datapp.df=Pitch; // Monitor6(datapp.d8u[0]); // Monitor6(datapp.d8u[1]); // Monitor6(datapp.d8u[2]); // Monitor6(datapp.d8u[3]); } void DMA2_Stream7_IRQHandler(void) // USART3_TX { if (DMA_GetITStatus(DMA2_Stream7, DMA_IT_TCIF7)) { DMA_ClearITPendingBit(DMA2_Stream7, DMA_IT_TCIF7); fTxFree=1; } } void DMA1_Stream4_IRQHandler(void) // USART3_TX { if (DMA_GetITStatus(DMA1_Stream4, DMA_IT_TCIF4)) { DMA_ClearITPendingBit(DMA1_Stream4, DMA_IT_TCIF4); fTxFreeX=1; } } void DMA1_Stream3_IRQHandler(void) // USART3_TX { if (DMA_GetITStatus(DMA1_Stream3, DMA_IT_TCIF3)) { DMA_ClearITPendingBit(DMA1_Stream3, DMA_IT_TCIF3); fTxFree3=1; } } /******************************************************************************/ /* STM32F4xx Peripherals Interrupt Handlers */ /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */ /* available peripheral interrupt handler's name please refer to the startup */ /* file (startup_stm32f4xx.s). */ /******************************************************************************/ /** * @brief This function handles PPP interrupt request. * @param None * @retval None */ /*void PPP_IRQHandler(void) { }*/ /** * @} */ /** * @} */ /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/