stm32f4xx_it.c 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /**
  2. ******************************************************************************
  3. * @file Project/STM32F4xx_StdPeriph_Templates/stm32f4xx_it.c
  4. * @author MCD Application Team
  5. * @version V1.5.0
  6. * @date 06-March-2015
  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 2015 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. #include "dev_task.h"
  32. #include "iap.h"
  33. #include "systick.h"
  34. #include "uart_interface.h"
  35. /** @addtogroup Template_Project
  36. * @{
  37. */
  38. /* Private typedef -----------------------------------------------------------*/
  39. /* Private define ------------------------------------------------------------*/
  40. /* Private macro -------------------------------------------------------------*/
  41. /* Private variables ---------------------------------------------------------*/
  42. /* Private function prototypes -----------------------------------------------*/
  43. /* Private functions ---------------------------------------------------------*/
  44. /******************************************************************************/
  45. /* Cortex-M4 Processor Exceptions Handlers */
  46. /******************************************************************************/
  47. /**
  48. * @brief This function handles NMI exception.
  49. * @param None
  50. * @retval None
  51. */
  52. void NMI_Handler(void)
  53. {
  54. }
  55. /**
  56. * @brief This function handles Hard Fault exception.
  57. * @param None
  58. * @retval None
  59. */
  60. __attribute__((weak)) void HardFault_Handler(void) {}
  61. /**
  62. * @brief This function handles Memory Manage exception.
  63. * @param None
  64. * @retval None
  65. */
  66. void MemManage_Handler(void)
  67. {
  68. /* Go to infinite loop when Memory Manage exception occurs */
  69. while (1)
  70. {
  71. }
  72. }
  73. /**
  74. * @brief This function handles Bus Fault exception.
  75. * @param None
  76. * @retval None
  77. */
  78. void BusFault_Handler(void)
  79. {
  80. /* Go to infinite loop when Bus Fault exception occurs */
  81. while (1)
  82. {
  83. }
  84. }
  85. /**
  86. * @brief This function handles Usage Fault exception.
  87. * @param None
  88. * @retval None
  89. */
  90. void UsageFault_Handler(void)
  91. {
  92. /* Go to infinite loop when Usage Fault exception occurs */
  93. while (1)
  94. {
  95. }
  96. }
  97. /**
  98. * @brief This function handles SVCall exception.
  99. * @param None
  100. * @retval None
  101. */
  102. void SVC_Handler(void)
  103. {
  104. }
  105. /**
  106. * @brief This function handles Debug Monitor exception.
  107. * @param None
  108. * @retval None
  109. */
  110. void DebugMon_Handler(void) {}
  111. /**
  112. * @brief This function handles PendSVC exception.
  113. * @param None
  114. * @retval None
  115. */
  116. void PendSV_Handler(void) {}
  117. /**
  118. * @brief This function handles SysTick Handler.
  119. * @param None
  120. * @retval None
  121. */
  122. void SysTick_Handler(void)
  123. {
  124. dev_task_clock();
  125. dev_systick_decrement();
  126. dev_systick_increase();
  127. uart_rx_ticks();
  128. systick_handler();
  129. jump_boot_time_ctrl();
  130. }
  131. /******************************************************************************/
  132. /* STM32F4xx Peripherals Interrupt Handlers */
  133. /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
  134. /* available peripheral interrupt handler's name please refer to the startup */
  135. /* file (startup_stm32f4xx.s). */
  136. /******************************************************************************/
  137. /**
  138. * @brief This function handles PPP interrupt request.
  139. * @param None
  140. * @retval None
  141. */
  142. /*void PPP_IRQHandler(void)
  143. {
  144. }*/
  145. /**
  146. * @}
  147. */
  148. void UART4_IRQHandler(void)
  149. {
  150. uart4_it();
  151. }
  152. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/