stm32f7xx_it.c 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file stm32f7xx_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 "stm32f7xx_it.h"
  22. #include "FreeRTOS.h"
  23. #include "task.h"
  24. /* Private includes ----------------------------------------------------------*/
  25. /* USER CODE BEGIN Includes */
  26. #include "tusb.h"
  27. /* USER CODE END Includes */
  28. /* Private typedef -----------------------------------------------------------*/
  29. /* USER CODE BEGIN TD */
  30. /* USER CODE END TD */
  31. /* Private define ------------------------------------------------------------*/
  32. /* USER CODE BEGIN PD */
  33. /* USER CODE END PD */
  34. /* Private macro -------------------------------------------------------------*/
  35. /* USER CODE BEGIN PM */
  36. /* USER CODE END PM */
  37. /* Private variables ---------------------------------------------------------*/
  38. /* USER CODE BEGIN PV */
  39. /* USER CODE END PV */
  40. /* Private function prototypes -----------------------------------------------*/
  41. /* USER CODE BEGIN PFP */
  42. /* USER CODE END PFP */
  43. /* Private user code ---------------------------------------------------------*/
  44. /* USER CODE BEGIN 0 */
  45. /* USER CODE END 0 */
  46. /* External variables --------------------------------------------------------*/
  47. extern PCD_HandleTypeDef hpcd_USB_OTG_HS;
  48. /* USER CODE BEGIN EV */
  49. /* USER CODE END EV */
  50. /******************************************************************************/
  51. /* Cortex-M7 Processor Interruption and Exception Handlers */
  52. /******************************************************************************/
  53. /**
  54. * @brief This function handles Non maskable interrupt.
  55. */
  56. void NMI_Handler(void)
  57. {
  58. /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  59. /* USER CODE END NonMaskableInt_IRQn 0 */
  60. /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  61. while (1)
  62. {
  63. }
  64. /* USER CODE END NonMaskableInt_IRQn 1 */
  65. }
  66. /**
  67. * @brief This function handles Hard fault interrupt.
  68. */
  69. void HardFault_Handler(void)
  70. {
  71. /* USER CODE BEGIN HardFault_IRQn 0 */
  72. /* USER CODE END HardFault_IRQn 0 */
  73. while (1)
  74. {
  75. /* USER CODE BEGIN W1_HardFault_IRQn 0 */
  76. /* USER CODE END W1_HardFault_IRQn 0 */
  77. }
  78. }
  79. /**
  80. * @brief This function handles Memory management fault.
  81. */
  82. void MemManage_Handler(void)
  83. {
  84. /* USER CODE BEGIN MemoryManagement_IRQn 0 */
  85. /* USER CODE END MemoryManagement_IRQn 0 */
  86. while (1)
  87. {
  88. /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
  89. /* USER CODE END W1_MemoryManagement_IRQn 0 */
  90. }
  91. }
  92. /**
  93. * @brief This function handles Pre-fetch fault, memory access fault.
  94. */
  95. void BusFault_Handler(void)
  96. {
  97. /* USER CODE BEGIN BusFault_IRQn 0 */
  98. /* USER CODE END BusFault_IRQn 0 */
  99. while (1)
  100. {
  101. /* USER CODE BEGIN W1_BusFault_IRQn 0 */
  102. /* USER CODE END W1_BusFault_IRQn 0 */
  103. }
  104. }
  105. /**
  106. * @brief This function handles Undefined instruction or illegal state.
  107. */
  108. void UsageFault_Handler(void)
  109. {
  110. /* USER CODE BEGIN UsageFault_IRQn 0 */
  111. /* USER CODE END UsageFault_IRQn 0 */
  112. while (1)
  113. {
  114. /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
  115. /* USER CODE END W1_UsageFault_IRQn 0 */
  116. }
  117. }
  118. /**
  119. * @brief This function handles Debug monitor.
  120. */
  121. void DebugMon_Handler(void)
  122. {
  123. /* USER CODE BEGIN DebugMonitor_IRQn 0 */
  124. /* USER CODE END DebugMonitor_IRQn 0 */
  125. /* USER CODE BEGIN DebugMonitor_IRQn 1 */
  126. /* USER CODE END DebugMonitor_IRQn 1 */
  127. }
  128. /**
  129. * @brief This function handles System tick timer.
  130. */
  131. void SysTick_Handler(void)
  132. {
  133. /* USER CODE BEGIN SysTick_IRQn 0 */
  134. /* USER CODE END SysTick_IRQn 0 */
  135. HAL_IncTick();
  136. #if (INCLUDE_xTaskGetSchedulerState == 1 )
  137. if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED)
  138. {
  139. #endif /* INCLUDE_xTaskGetSchedulerState */
  140. xPortSysTickHandler();
  141. #if (INCLUDE_xTaskGetSchedulerState == 1 )
  142. }
  143. #endif /* INCLUDE_xTaskGetSchedulerState */
  144. /* USER CODE BEGIN SysTick_IRQn 1 */
  145. /* USER CODE END SysTick_IRQn 1 */
  146. }
  147. /******************************************************************************/
  148. /* STM32F7xx Peripheral Interrupt Handlers */
  149. /* Add here the Interrupt Handlers for the used peripherals. */
  150. /* For the available peripheral interrupt handler names, */
  151. /* please refer to the startup file (startup_stm32f7xx.s). */
  152. /******************************************************************************/
  153. /**
  154. * @brief This function handles USB On The Go HS global interrupt.
  155. */
  156. void OTG_HS_IRQHandler(void)
  157. {
  158. /* USER CODE BEGIN OTG_HS_IRQn 0 */
  159. tud_int_handler(BOARD_DEVICE_RHPORT_NUM);
  160. return;
  161. /* USER CODE END OTG_HS_IRQn 0 */
  162. HAL_PCD_IRQHandler(&hpcd_USB_OTG_HS);
  163. /* USER CODE BEGIN OTG_HS_IRQn 1 */
  164. /* USER CODE END OTG_HS_IRQn 1 */
  165. }
  166. /* USER CODE BEGIN 1 */
  167. /* USER CODE END 1 */