Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

stm32f1xx_it.c 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file stm32f1xx_it.c
  5. * @brief Interrupt Service Routines.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2023 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under Ultimate Liberty license
  13. * SLA0044, the "License"; You may not use this file except in compliance with
  14. * the License. You may obtain a copy of the License at:
  15. * www.st.com/SLA0044
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Includes ------------------------------------------------------------------*/
  21. #include "main.h"
  22. #include "stm32f1xx_it.h"
  23. /* Private includes ----------------------------------------------------------*/
  24. /* USER CODE BEGIN Includes */
  25. /* USER CODE END Includes */
  26. /* Private typedef -----------------------------------------------------------*/
  27. /* USER CODE BEGIN TD */
  28. /* USER CODE END TD */
  29. /* Private define ------------------------------------------------------------*/
  30. /* USER CODE BEGIN PD */
  31. /* USER CODE END PD */
  32. /* Private macro -------------------------------------------------------------*/
  33. /* USER CODE BEGIN PM */
  34. /* USER CODE END PM */
  35. /* Private variables ---------------------------------------------------------*/
  36. /* USER CODE BEGIN PV */
  37. /* USER CODE END PV */
  38. /* Private function prototypes -----------------------------------------------*/
  39. /* USER CODE BEGIN PFP */
  40. /* USER CODE END PFP */
  41. /* Private user code ---------------------------------------------------------*/
  42. /* USER CODE BEGIN 0 */
  43. /* USER CODE END 0 */
  44. /* External variables --------------------------------------------------------*/
  45. extern TIM_HandleTypeDef htim1;
  46. /* USER CODE BEGIN EV */
  47. /* USER CODE END EV */
  48. /******************************************************************************/
  49. /* Cortex-M3 Processor Interruption and Exception Handlers */
  50. /******************************************************************************/
  51. /**
  52. * @brief This function handles Non maskable interrupt.
  53. */
  54. void NMI_Handler(void)
  55. {
  56. /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  57. /* USER CODE END NonMaskableInt_IRQn 0 */
  58. /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  59. while (1)
  60. {
  61. }
  62. /* USER CODE END NonMaskableInt_IRQn 1 */
  63. }
  64. /**
  65. * @brief This function handles Hard fault interrupt.
  66. */
  67. __WEAK void HardFault_Handler(void)
  68. {
  69. /* USER CODE BEGIN HardFault_IRQn 0 */
  70. /* USER CODE END HardFault_IRQn 0 */
  71. while (1)
  72. {
  73. /* USER CODE BEGIN W1_HardFault_IRQn 0 */
  74. /* USER CODE END W1_HardFault_IRQn 0 */
  75. }
  76. }
  77. /**
  78. * @brief This function handles Memory management fault.
  79. */
  80. void MemManage_Handler(void)
  81. {
  82. /* USER CODE BEGIN MemoryManagement_IRQn 0 */
  83. /* USER CODE END MemoryManagement_IRQn 0 */
  84. while (1)
  85. {
  86. /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
  87. /* USER CODE END W1_MemoryManagement_IRQn 0 */
  88. }
  89. }
  90. /**
  91. * @brief This function handles Prefetch fault, memory access fault.
  92. */
  93. void BusFault_Handler(void)
  94. {
  95. /* USER CODE BEGIN BusFault_IRQn 0 */
  96. /* USER CODE END BusFault_IRQn 0 */
  97. while (1)
  98. {
  99. /* USER CODE BEGIN W1_BusFault_IRQn 0 */
  100. /* USER CODE END W1_BusFault_IRQn 0 */
  101. }
  102. }
  103. /**
  104. * @brief This function handles Undefined instruction or illegal state.
  105. */
  106. void UsageFault_Handler(void)
  107. {
  108. /* USER CODE BEGIN UsageFault_IRQn 0 */
  109. /* USER CODE END UsageFault_IRQn 0 */
  110. while (1)
  111. {
  112. /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
  113. /* USER CODE END W1_UsageFault_IRQn 0 */
  114. }
  115. }
  116. /**
  117. * @brief This function handles Debug monitor.
  118. */
  119. void DebugMon_Handler(void)
  120. {
  121. /* USER CODE BEGIN DebugMonitor_IRQn 0 */
  122. /* USER CODE END DebugMonitor_IRQn 0 */
  123. /* USER CODE BEGIN DebugMonitor_IRQn 1 */
  124. /* USER CODE END DebugMonitor_IRQn 1 */
  125. }
  126. /******************************************************************************/
  127. /* STM32F1xx Peripheral Interrupt Handlers */
  128. /* Add here the Interrupt Handlers for the used peripherals. */
  129. /* For the available peripheral interrupt handler names, */
  130. /* please refer to the startup file (startup_stm32f1xx.s). */
  131. /******************************************************************************/
  132. /**
  133. * @brief This function handles TIM1 update interrupt.
  134. */
  135. void TIM1_UP_IRQHandler(void)
  136. {
  137. /* USER CODE BEGIN TIM1_UP_IRQn 0 */
  138. /* USER CODE END TIM1_UP_IRQn 0 */
  139. HAL_TIM_IRQHandler(&htim1);
  140. /* USER CODE BEGIN TIM1_UP_IRQn 1 */
  141. /* USER CODE END TIM1_UP_IRQn 1 */
  142. }
  143. /* USER CODE BEGIN 1 */
  144. /* USER CODE END 1 */
  145. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/