stm32f4xx_it.c 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /**
  2. ******************************************************************************
  3. * @file Project/STM32F4xx_StdPeriph_Templates/stm32f4xx_it.c
  4. * @author MCD Application Team
  5. * @version V1.4.0
  6. * @date 04-August-2014
  7. * @brief Main Interrupt Service Routines.
  8. * This file provides template for all exceptions handler and
  9. * peripherals interrupt service routine.
  10. ******************************************************************************
  11. * @attention
  12. *
  13. * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
  14. *
  15. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  16. * You may not use this file except in compliance with the License.
  17. * You may obtain a copy of the License at:
  18. *
  19. * http://www.st.com/software_license_agreement_liberty_v2
  20. *
  21. * Unless required by applicable law or agreed to in writing, software
  22. * distributed under the License is distributed on an "AS IS" BASIS,
  23. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24. * See the License for the specific language governing permissions and
  25. * limitations under the License.
  26. *
  27. ******************************************************************************
  28. */
  29. /* Includes ------------------------------------------------------------------*/
  30. #include "stm32f4xx_it.h"
  31. /** @addtogroup Template_Project
  32. * @{
  33. */
  34. /* Private typedef -----------------------------------------------------------*/
  35. /* Private define ------------------------------------------------------------*/
  36. /* Private macro -------------------------------------------------------------*/
  37. /* Private variables ---------------------------------------------------------*/
  38. /* Private function prototypes -----------------------------------------------*/
  39. /* Private functions ---------------------------------------------------------*/
  40. /******************************************************************************/
  41. /* Cortex-M4 Processor Exceptions Handlers */
  42. /******************************************************************************/
  43. /**
  44. * @brief This function handles NMI exception.
  45. * @param None
  46. * @retval None
  47. */
  48. void NMI_Handler(void)
  49. {
  50. }
  51. /**
  52. * @brief This function handles Hard Fault exception.
  53. * @param None
  54. * @retval None
  55. */
  56. void HardFault_Handler(void)
  57. {
  58. //reboot
  59. SCB->AIRCR = (0x5FA << SCB_AIRCR_VECTKEY_Pos) | SCB_AIRCR_SYSRESETREQ_Msk;
  60. /* Go to infinite loop when Hard Fault exception occurs */
  61. while (1)
  62. {
  63. }
  64. }
  65. /**
  66. * @brief This function handles Memory Manage exception.
  67. * @param None
  68. * @retval None
  69. */
  70. void MemManage_Handler(void)
  71. {
  72. //reboot
  73. SCB->AIRCR = (0x5FA << SCB_AIRCR_VECTKEY_Pos) | SCB_AIRCR_SYSRESETREQ_Msk;
  74. /* Go to infinite loop when Memory Manage exception occurs */
  75. while (1)
  76. {
  77. }
  78. }
  79. /**
  80. * @brief This function handles Bus Fault exception.
  81. * @param None
  82. * @retval None
  83. */
  84. void BusFault_Handler(void)
  85. {
  86. /* Go to infinite loop when Bus Fault exception occurs */
  87. while (1)
  88. {
  89. }
  90. }
  91. /**
  92. * @brief This function handles Usage Fault exception.
  93. * @param None
  94. * @retval None
  95. */
  96. void UsageFault_Handler(void)
  97. {
  98. /* Go to infinite loop when Usage Fault exception occurs */
  99. while (1)
  100. {
  101. }
  102. }
  103. /**
  104. * @brief This function handles SVCall exception.
  105. * @param None
  106. * @retval None
  107. */
  108. void SVC_Handler(void)
  109. {
  110. }
  111. /**
  112. * @brief This function handles Debug Monitor exception.
  113. * @param None
  114. * @retval None
  115. */
  116. void DebugMon_Handler(void)
  117. {
  118. }
  119. /**
  120. * @brief This function handles PendSVC exception.
  121. * @param None
  122. * @retval None
  123. */
  124. void PendSV_Handler(void)
  125. {
  126. }
  127. /**
  128. * @brief This function handles SysTick Handler.
  129. * @param None
  130. * @retval None
  131. */
  132. void SysTick_Handler(void)
  133. {
  134. }
  135. /******************************************************************************/
  136. /* STM32F4xx Peripherals Interrupt Handlers */
  137. /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
  138. /* available peripheral interrupt handler's name please refer to the startup */
  139. /* file (startup_stm32f4xx.s). */
  140. /******************************************************************************/
  141. /**
  142. * @brief This function handles PPP interrupt request.
  143. * @param None
  144. * @retval None
  145. */
  146. /*void PPP_IRQHandler(void)
  147. {
  148. }*/
  149. /**
  150. * @}
  151. */
  152. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/