You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

206 lines
5.3 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file stm32f4xx_it.c
  5. * @brief Interrupt Service Routines.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * Copyright (c) 2023 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 "stm32f4xx_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 ETH_HandleTypeDef heth;
  45. extern TIM_HandleTypeDef htim6;
  46. extern TIM_HandleTypeDef htim1;
  47. /* USER CODE BEGIN EV */
  48. /* USER CODE END EV */
  49. /******************************************************************************/
  50. /* Cortex-M4 Processor Interruption and Exception Handlers */
  51. /******************************************************************************/
  52. /**
  53. * @brief This function handles Non maskable interrupt.
  54. */
  55. void NMI_Handler(void)
  56. {
  57. /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  58. /* USER CODE END NonMaskableInt_IRQn 0 */
  59. /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  60. /* USER CODE END NonMaskableInt_IRQn 1 */
  61. }
  62. /**
  63. * @brief This function handles Hard fault interrupt.
  64. */
  65. void HardFault_Handler(void)
  66. {
  67. /* USER CODE BEGIN HardFault_IRQn 0 */
  68. /* USER CODE END HardFault_IRQn 0 */
  69. while (1)
  70. {
  71. /* USER CODE BEGIN W1_HardFault_IRQn 0 */
  72. /* USER CODE END W1_HardFault_IRQn 0 */
  73. }
  74. }
  75. /**
  76. * @brief This function handles Memory management fault.
  77. */
  78. void MemManage_Handler(void)
  79. {
  80. /* USER CODE BEGIN MemoryManagement_IRQn 0 */
  81. /* USER CODE END MemoryManagement_IRQn 0 */
  82. while (1)
  83. {
  84. /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
  85. /* USER CODE END W1_MemoryManagement_IRQn 0 */
  86. }
  87. }
  88. /**
  89. * @brief This function handles Pre-fetch fault, memory access fault.
  90. */
  91. void BusFault_Handler(void)
  92. {
  93. /* USER CODE BEGIN BusFault_IRQn 0 */
  94. /* USER CODE END BusFault_IRQn 0 */
  95. while (1)
  96. {
  97. /* USER CODE BEGIN W1_BusFault_IRQn 0 */
  98. /* USER CODE END W1_BusFault_IRQn 0 */
  99. }
  100. }
  101. /**
  102. * @brief This function handles Undefined instruction or illegal state.
  103. */
  104. void UsageFault_Handler(void)
  105. {
  106. /* USER CODE BEGIN UsageFault_IRQn 0 */
  107. /* USER CODE END UsageFault_IRQn 0 */
  108. while (1)
  109. {
  110. /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
  111. /* USER CODE END W1_UsageFault_IRQn 0 */
  112. }
  113. }
  114. /**
  115. * @brief This function handles Debug monitor.
  116. */
  117. void DebugMon_Handler(void)
  118. {
  119. /* USER CODE BEGIN DebugMonitor_IRQn 0 */
  120. /* USER CODE END DebugMonitor_IRQn 0 */
  121. /* USER CODE BEGIN DebugMonitor_IRQn 1 */
  122. /* USER CODE END DebugMonitor_IRQn 1 */
  123. }
  124. /******************************************************************************/
  125. /* STM32F4xx Peripheral Interrupt Handlers */
  126. /* Add here the Interrupt Handlers for the used peripherals. */
  127. /* For the available peripheral interrupt handler names, */
  128. /* please refer to the startup file (startup_stm32f4xx.s). */
  129. /******************************************************************************/
  130. /**
  131. * @brief This function handles TIM1 update interrupt and TIM10 global interrupt.
  132. */
  133. void TIM1_UP_TIM10_IRQHandler(void)
  134. {
  135. /* USER CODE BEGIN TIM1_UP_TIM10_IRQn 0 */
  136. /* USER CODE END TIM1_UP_TIM10_IRQn 0 */
  137. HAL_TIM_IRQHandler(&htim1);
  138. /* USER CODE BEGIN TIM1_UP_TIM10_IRQn 1 */
  139. /* USER CODE END TIM1_UP_TIM10_IRQn 1 */
  140. }
  141. /**
  142. * @brief This function handles TIM6 global interrupt, DAC1 and DAC2 underrun error interrupts.
  143. */
  144. void TIM6_DAC_IRQHandler(void)
  145. {
  146. /* USER CODE BEGIN TIM6_DAC_IRQn 0 */
  147. /* USER CODE END TIM6_DAC_IRQn 0 */
  148. HAL_TIM_IRQHandler(&htim6);
  149. /* USER CODE BEGIN TIM6_DAC_IRQn 1 */
  150. /* USER CODE END TIM6_DAC_IRQn 1 */
  151. }
  152. /**
  153. * @brief This function handles Ethernet global interrupt.
  154. */
  155. void ETH_IRQHandler(void)
  156. {
  157. /* USER CODE BEGIN ETH_IRQn 0 */
  158. /* USER CODE END ETH_IRQn 0 */
  159. HAL_ETH_IRQHandler(&heth);
  160. /* USER CODE BEGIN ETH_IRQn 1 */
  161. /* USER CODE END ETH_IRQn 1 */
  162. }
  163. /* USER CODE BEGIN 1 */
  164. /* USER CODE END 1 */