/Projects/NUCLEO-L452RE/Examples/UART/UART_TwoBoards_ComDMA/Src/stm32l4xx_it.c

https://github.com/STMicroelectronics/STM32CubeL4 · C · 216 lines · 59 code · 24 blank · 133 comment · 4 complexity · 4bedba5e314f9a1a706b2e9f6d83d1e5 MD5 · raw file

  1. /**
  2. ******************************************************************************
  3. * @file UART/UART_TwoBoards_ComDMA/Src/stm32l4xx_it.c
  4. * @author MCD Application Team
  5. * @brief Main Interrupt Service Routines.
  6. * This file provides template for all exceptions handler and
  7. * peripherals interrupt service routine.
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  12. * All rights reserved.</center></h2>
  13. *
  14. * This software component is licensed by ST under BSD 3-Clause license,
  15. * the "License"; You may not use this file except in compliance with the
  16. * License. You may obtain a copy of the License at:
  17. * opensource.org/licenses/BSD-3-Clause
  18. *
  19. ******************************************************************************
  20. */
  21. /* Includes ------------------------------------------------------------------*/
  22. #include "main.h"
  23. #include "stm32l4xx_it.h"
  24. /** @addtogroup STM32L4xx_HAL_Examples
  25. * @{
  26. */
  27. /** @addtogroup UART_TwoBoards_ComDMA
  28. * @{
  29. */
  30. /* Private typedef -----------------------------------------------------------*/
  31. /* Private define ------------------------------------------------------------*/
  32. /* Private macro -------------------------------------------------------------*/
  33. /* Private variables ---------------------------------------------------------*/
  34. /* UART handler declared in "main.c" file */
  35. extern UART_HandleTypeDef UartHandle;
  36. /* Private function prototypes -----------------------------------------------*/
  37. /* Private functions ---------------------------------------------------------*/
  38. /******************************************************************************/
  39. /* Cortex-M4 Processor Exceptions Handlers */
  40. /******************************************************************************/
  41. /**
  42. * @brief This function handles NMI exception.
  43. * @param None
  44. * @retval None
  45. */
  46. void NMI_Handler(void)
  47. {
  48. }
  49. /**
  50. * @brief This function handles Hard Fault exception.
  51. * @param None
  52. * @retval None
  53. */
  54. void HardFault_Handler(void)
  55. {
  56. /* Go to infinite loop when Hard Fault exception occurs */
  57. while (1)
  58. {
  59. }
  60. }
  61. /**
  62. * @brief This function handles Memory Manage exception.
  63. * @param None
  64. * @retval None
  65. */
  66. void MemManage_Handler(void)
  67. {
  68. /* Go to infinite loop when Memory Manage exception occurs */
  69. while (1)
  70. {
  71. }
  72. }
  73. /**
  74. * @brief This function handles Bus Fault exception.
  75. * @param None
  76. * @retval None
  77. */
  78. void BusFault_Handler(void)
  79. {
  80. /* Go to infinite loop when Bus Fault exception occurs */
  81. while (1)
  82. {
  83. }
  84. }
  85. /**
  86. * @brief This function handles Usage Fault exception.
  87. * @param None
  88. * @retval None
  89. */
  90. void UsageFault_Handler(void)
  91. {
  92. /* Go to infinite loop when Usage Fault exception occurs */
  93. while (1)
  94. {
  95. }
  96. }
  97. /**
  98. * @brief This function handles SVCall exception.
  99. * @param None
  100. * @retval None
  101. */
  102. void SVC_Handler(void)
  103. {
  104. }
  105. /**
  106. * @brief This function handles Debug Monitor exception.
  107. * @param None
  108. * @retval None
  109. */
  110. void DebugMon_Handler(void)
  111. {
  112. }
  113. /**
  114. * @brief This function handles PendSVC exception.
  115. * @param None
  116. * @retval None
  117. */
  118. void PendSV_Handler(void)
  119. {
  120. }
  121. /**
  122. * @brief This function handles SysTick Handler.
  123. * @param None
  124. * @retval None
  125. */
  126. void SysTick_Handler(void)
  127. {
  128. HAL_IncTick();
  129. }
  130. /******************************************************************************/
  131. /* STM32L4xx Peripherals Interrupt Handlers */
  132. /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
  133. /* available peripheral interrupt handler's name please refer to the startup */
  134. /* file (startup_stm32l4xx.s). */
  135. /******************************************************************************/
  136. /**
  137. * @brief This function handles DMA interrupt request.
  138. * @param None
  139. * @retval None
  140. * @Note This function is redefined in "main.h" and related to DMA
  141. * used for USART data transmission
  142. */
  143. void USARTx_DMA_RX_IRQHandler(void)
  144. {
  145. HAL_DMA_IRQHandler(UartHandle.hdmarx);
  146. }
  147. /**
  148. * @brief This function handles DMA interrupt request.
  149. * @param None
  150. * @retval None
  151. * @Note This function is redefined in "main.h" and related to DMA
  152. * used for USART data reception
  153. */
  154. void USARTx_DMA_TX_IRQHandler(void)
  155. {
  156. HAL_DMA_IRQHandler(UartHandle.hdmatx);
  157. }
  158. /**
  159. * @brief This function handles UART interrupt request.
  160. * @param None
  161. * @retval None
  162. * @Note This function is redefined in "main.h" and related to DMA
  163. * used for USART data transmission
  164. */
  165. void USARTx_IRQHandler(void)
  166. {
  167. HAL_UART_IRQHandler(&UartHandle);
  168. }
  169. /**
  170. * @brief This function handles external lines 10 to 15 interrupt request.
  171. * @param None
  172. * @retval None
  173. */
  174. void EXTI15_10_IRQHandler(void)
  175. {
  176. HAL_GPIO_EXTI_IRQHandler(USER_BUTTON_PIN);
  177. }
  178. /**
  179. * @brief This function handles PPP interrupt request.
  180. * @param None
  181. * @retval None
  182. */
  183. /*void PPP_IRQHandler(void)
  184. {
  185. }*/
  186. /**
  187. * @}
  188. */
  189. /**
  190. * @}
  191. */
  192. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/