stm32f1xx_it.c 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file stm32f1xx_it.c
  5. * @brief Interrupt Service Routines.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * Copyright (c) 2024 STMicroelectronics.
  10. * All rights reserved.
  11. *
  12. * This software is licensed under terms that can be found in the LICENSE file
  13. * in the root directory of this software component.
  14. * If no LICENSE file comes with this software, it is provided AS-IS.
  15. *
  16. ******************************************************************************
  17. */
  18. /* USER CODE END Header */
  19. /* Includes ------------------------------------------------------------------*/
  20. #include "main.h"
  21. #include "stm32f1xx_it.h"
  22. /* Private includes ----------------------------------------------------------*/
  23. /* USER CODE BEGIN Includes */
  24. /* USER CODE END Includes */
  25. /* Private typedef -----------------------------------------------------------*/
  26. /* USER CODE BEGIN TD */
  27. /* USER CODE END TD */
  28. /* Private define ------------------------------------------------------------*/
  29. /* USER CODE BEGIN PD */
  30. /* USER CODE END PD */
  31. /* Private macro -------------------------------------------------------------*/
  32. /* USER CODE BEGIN PM */
  33. /* USER CODE END PM */
  34. /* Private variables ---------------------------------------------------------*/
  35. /* USER CODE BEGIN PV */
  36. /* USER CODE END PV */
  37. /* Private function prototypes -----------------------------------------------*/
  38. /* USER CODE BEGIN PFP */
  39. /* USER CODE END PFP */
  40. /* Private user code ---------------------------------------------------------*/
  41. /* USER CODE BEGIN 0 */
  42. /* USER CODE END 0 */
  43. /* External variables --------------------------------------------------------*/
  44. extern PCD_HandleTypeDef hpcd_USB_FS;
  45. /* USER CODE BEGIN EV */
  46. /* USER CODE END EV */
  47. /******************************************************************************/
  48. /* Cortex-M3 Processor Interruption and Exception Handlers */
  49. /******************************************************************************/
  50. /**
  51. * @brief This function handles Non maskable interrupt.
  52. */
  53. void NMI_Handler(void)
  54. {
  55. /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  56. /* USER CODE END NonMaskableInt_IRQn 0 */
  57. /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  58. while (1)
  59. {
  60. }
  61. /* USER CODE END NonMaskableInt_IRQn 1 */
  62. }
  63. /**
  64. * @brief This function handles Hard fault interrupt.
  65. */
  66. void HardFault_Handler(void)
  67. {
  68. /* USER CODE BEGIN HardFault_IRQn 0 */
  69. /* USER CODE END HardFault_IRQn 0 */
  70. while (1)
  71. {
  72. /* USER CODE BEGIN W1_HardFault_IRQn 0 */
  73. /* USER CODE END W1_HardFault_IRQn 0 */
  74. }
  75. }
  76. /**
  77. * @brief This function handles Memory management fault.
  78. */
  79. void MemManage_Handler(void)
  80. {
  81. /* USER CODE BEGIN MemoryManagement_IRQn 0 */
  82. /* USER CODE END MemoryManagement_IRQn 0 */
  83. while (1)
  84. {
  85. /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
  86. /* USER CODE END W1_MemoryManagement_IRQn 0 */
  87. }
  88. }
  89. /**
  90. * @brief This function handles Prefetch fault, memory access fault.
  91. */
  92. void BusFault_Handler(void)
  93. {
  94. /* USER CODE BEGIN BusFault_IRQn 0 */
  95. /* USER CODE END BusFault_IRQn 0 */
  96. while (1)
  97. {
  98. /* USER CODE BEGIN W1_BusFault_IRQn 0 */
  99. /* USER CODE END W1_BusFault_IRQn 0 */
  100. }
  101. }
  102. /**
  103. * @brief This function handles Undefined instruction or illegal state.
  104. */
  105. void UsageFault_Handler(void)
  106. {
  107. /* USER CODE BEGIN UsageFault_IRQn 0 */
  108. /* USER CODE END UsageFault_IRQn 0 */
  109. while (1)
  110. {
  111. /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
  112. /* USER CODE END W1_UsageFault_IRQn 0 */
  113. }
  114. }
  115. /**
  116. * @brief This function handles System service call via SWI instruction.
  117. */
  118. void SVC_Handler(void)
  119. {
  120. /* USER CODE BEGIN SVCall_IRQn 0 */
  121. /* USER CODE END SVCall_IRQn 0 */
  122. /* USER CODE BEGIN SVCall_IRQn 1 */
  123. /* USER CODE END SVCall_IRQn 1 */
  124. }
  125. /**
  126. * @brief This function handles Debug monitor.
  127. */
  128. void DebugMon_Handler(void)
  129. {
  130. /* USER CODE BEGIN DebugMonitor_IRQn 0 */
  131. /* USER CODE END DebugMonitor_IRQn 0 */
  132. /* USER CODE BEGIN DebugMonitor_IRQn 1 */
  133. /* USER CODE END DebugMonitor_IRQn 1 */
  134. }
  135. /**
  136. * @brief This function handles Pendable request for system service.
  137. */
  138. void PendSV_Handler(void)
  139. {
  140. /* USER CODE BEGIN PendSV_IRQn 0 */
  141. /* USER CODE END PendSV_IRQn 0 */
  142. /* USER CODE BEGIN PendSV_IRQn 1 */
  143. /* USER CODE END PendSV_IRQn 1 */
  144. }
  145. /**
  146. * @brief This function handles System tick timer.
  147. */
  148. void SysTick_Handler(void)
  149. {
  150. /* USER CODE BEGIN SysTick_IRQn 0 */
  151. /* USER CODE END SysTick_IRQn 0 */
  152. HAL_IncTick();
  153. /* USER CODE BEGIN SysTick_IRQn 1 */
  154. /* USER CODE END SysTick_IRQn 1 */
  155. }
  156. /******************************************************************************/
  157. /* STM32F1xx Peripheral Interrupt Handlers */
  158. /* Add here the Interrupt Handlers for the used peripherals. */
  159. /* For the available peripheral interrupt handler names, */
  160. /* please refer to the startup file (startup_stm32f1xx.s). */
  161. /******************************************************************************/
  162. /**
  163. * @brief This function handles DMA1 channel5 global interrupt.
  164. */
  165. /**
  166. * @brief This function handles USB low priority or CAN RX0 interrupts.
  167. */
  168. void USB_LP_CAN1_RX0_IRQHandler(void)
  169. {
  170. /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 0 */
  171. /* USER CODE END USB_LP_CAN1_RX0_IRQn 0 */
  172. HAL_PCD_IRQHandler(&hpcd_USB_FS);
  173. /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 1 */
  174. /* USER CODE END USB_LP_CAN1_RX0_IRQn 1 */
  175. }
  176. /* USER CODE BEGIN 1 */
  177. /* USER CODE END 1 */