/Projects/STM324xG_EVAL/Examples/BSP/Src/stm32f4xx_it.c

https://github.com/Bosvark/STM32Cube_FW_F4_V1.1.0 · C · 238 lines · 63 code · 26 blank · 149 comment · 4 complexity · 17eaed764e39dd2a28dd0160c8b22390 MD5 · raw file

  1. /**
  2. ******************************************************************************
  3. * @file BSP/Src/stm32f4xx_it.c
  4. * @author MCD Application Team
  5. * @version V1.0.1
  6. * @date 26-February-2014
  7. * @brief Main Interrupt Service Routines.
  8. * This file provides template for all exceptions handler and
  9. * peripherals interrupt service routine.
  10. ******************************************************************************
  11. * @attention
  12. *
  13. * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
  14. *
  15. * Redistribution and use in source and binary forms, with or without modification,
  16. * are permitted provided that the following conditions are met:
  17. * 1. Redistributions of source code must retain the above copyright notice,
  18. * this list of conditions and the following disclaimer.
  19. * 2. Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  23. * may be used to endorse or promote products derived from this software
  24. * without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  27. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  29. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  30. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  32. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  33. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  34. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  35. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  36. *
  37. ******************************************************************************
  38. */
  39. /* Includes ------------------------------------------------------------------*/
  40. #include "stm32f4xx_it.h"
  41. /** @addtogroup STM32F4xx_HAL_Examples
  42. * @{
  43. */
  44. /** @addtogroup BSP
  45. * @{
  46. */
  47. /* Private typedef -----------------------------------------------------------*/
  48. /* Private define ------------------------------------------------------------*/
  49. /* Private macro -------------------------------------------------------------*/
  50. /* Private variables ---------------------------------------------------------*/
  51. extern I2C_HandleTypeDef heval_I2c;
  52. /* Private function prototypes -----------------------------------------------*/
  53. /* Private functions ---------------------------------------------------------*/
  54. /******************************************************************************/
  55. /* Cortex-M4 Processor Exceptions Handlers */
  56. /******************************************************************************/
  57. /**
  58. * @brief This function handles NMI exception.
  59. * @param None
  60. * @retval None
  61. */
  62. void NMI_Handler(void)
  63. {
  64. }
  65. /**
  66. * @brief This function handles Hard Fault exception.
  67. * @param None
  68. * @retval None
  69. */
  70. void HardFault_Handler(void)
  71. {
  72. /* Go to infinite loop when Hard Fault exception occurs */
  73. while (1)
  74. {
  75. }
  76. }
  77. /**
  78. * @brief This function handles Memory Manage exception.
  79. * @param None
  80. * @retval None
  81. */
  82. void MemManage_Handler(void)
  83. {
  84. /* Go to infinite loop when Memory Manage exception occurs */
  85. while (1)
  86. {
  87. }
  88. }
  89. /**
  90. * @brief This function handles Bus Fault exception.
  91. * @param None
  92. * @retval None
  93. */
  94. void BusFault_Handler(void)
  95. {
  96. /* Go to infinite loop when Bus Fault exception occurs */
  97. while (1)
  98. {
  99. }
  100. }
  101. /**
  102. * @brief This function handles Usage Fault exception.
  103. * @param None
  104. * @retval None
  105. */
  106. void UsageFault_Handler(void)
  107. {
  108. /* Go to infinite loop when Usage Fault exception occurs */
  109. while (1)
  110. {
  111. }
  112. }
  113. /**
  114. * @brief This function handles SVCall exception.
  115. * @param None
  116. * @retval None
  117. */
  118. void SVC_Handler(void)
  119. {
  120. }
  121. /**
  122. * @brief This function handles Debug Monitor exception.
  123. * @param None
  124. * @retval None
  125. */
  126. void DebugMon_Handler(void)
  127. {
  128. }
  129. /**
  130. * @brief This function handles PendSVC exception.
  131. * @param None
  132. * @retval None
  133. */
  134. void PendSV_Handler(void)
  135. {
  136. }
  137. /**
  138. * @brief This function handles SysTick Handler.
  139. * @param None
  140. * @retval None
  141. */
  142. void SysTick_Handler(void)
  143. {
  144. HAL_IncTick();
  145. Toggle_Leds();
  146. }
  147. /******************************************************************************/
  148. /* STM32F4xx Peripherals Interrupt Handlers */
  149. /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
  150. /* available peripheral interrupt handler's name please refer to the startup */
  151. /* file (startup_stm32f4xx.s). */
  152. /******************************************************************************/
  153. /**
  154. * @brief This function handles External line 1 interrupt request.
  155. * @param None
  156. * @retval None
  157. */
  158. void EXTI0_IRQHandler(void)
  159. {
  160. HAL_GPIO_EXTI_IRQHandler(WAKEUP_BUTTON_PIN);
  161. }
  162. /**
  163. * @brief This function handles External line 2 interrupt request.
  164. * @param None
  165. * @retval None
  166. */
  167. void EXTI2_IRQHandler(void)
  168. {
  169. HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2);
  170. }
  171. /**
  172. * @brief This function handles External line 15_10 interrupt request.
  173. * @param None
  174. * @retval None
  175. */
  176. void EXTI15_10_IRQHandler(void)
  177. {
  178. HAL_GPIO_EXTI_IRQHandler(TAMPER_BUTTON_PIN | KEY_BUTTON_PIN);
  179. }
  180. /**
  181. * @brief This function handles sEE DMA TX interrupt request.
  182. * @param None
  183. * @retval None
  184. */
  185. void EEPROM_I2C_DMA_TX_IRQHandler(void)
  186. {
  187. HAL_DMA_IRQHandler(heval_I2c.hdmatx);
  188. }
  189. /**
  190. * @brief This function handles sEE DMA RX interrupt request.
  191. * @param None
  192. * @retval None
  193. */
  194. void EEPROM_I2C_DMA_RX_IRQHandler(void)
  195. {
  196. HAL_DMA_IRQHandler(heval_I2c.hdmarx);
  197. }
  198. /**
  199. * @brief This function handles PPP interrupt request.
  200. * @param None
  201. * @retval None
  202. */
  203. /*void PPP_IRQHandler(void)
  204. {
  205. }*/
  206. /**
  207. * @}
  208. */
  209. /**
  210. * @}
  211. */
  212. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/