stm32f10x_it.c 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. /**
  2. ******************************************************************************
  3. * @file Project/STM32F10x_StdPeriph_Template/stm32f10x_it.c
  4. * @author MCD Application Team
  5. * @version V3.5.0
  6. * @date 08-April-2011
  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. * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  14. * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  15. * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  16. * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  17. * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  18. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  19. *
  20. * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
  21. ******************************************************************************
  22. */
  23. /* Includes ------------------------------------------------------------------*/
  24. #include "stm32f10x_it.h"
  25. #include <board.h>
  26. #include <rtthread.h>
  27. #include "bxcan.h"
  28. /** @addtogroup Template_Project
  29. * @{
  30. */
  31. /* Private typedef -----------------------------------------------------------*/
  32. /* Private define ------------------------------------------------------------*/
  33. /* Private macro -------------------------------------------------------------*/
  34. /* Private variables ---------------------------------------------------------*/
  35. /* Private function prototypes -----------------------------------------------*/
  36. /* Private functions ---------------------------------------------------------*/
  37. /******************************************************************************/
  38. /* Cortex-M3 Processor Exceptions Handlers */
  39. /******************************************************************************/
  40. /**
  41. * @brief This function handles NMI exception.
  42. * @param None
  43. * @retval None
  44. */
  45. void NMI_Handler(void)
  46. {
  47. }
  48. /**
  49. * @brief This function handles Memory Manage exception.
  50. * @param None
  51. * @retval None
  52. */
  53. void MemManage_Handler(void)
  54. {
  55. /* Go to infinite loop when Memory Manage exception occurs */
  56. while (1)
  57. {
  58. }
  59. }
  60. /**
  61. * @brief This function handles Bus Fault exception.
  62. * @param None
  63. * @retval None
  64. */
  65. void BusFault_Handler(void)
  66. {
  67. /* Go to infinite loop when Bus Fault exception occurs */
  68. while (1)
  69. {
  70. }
  71. }
  72. /**
  73. * @brief This function handles Usage Fault exception.
  74. * @param None
  75. * @retval None
  76. */
  77. void UsageFault_Handler(void)
  78. {
  79. /* Go to infinite loop when Usage Fault exception occurs */
  80. while (1)
  81. {
  82. }
  83. }
  84. /**
  85. * @brief This function handles SVCall exception.
  86. * @param None
  87. * @retval None
  88. */
  89. void SVC_Handler(void)
  90. {
  91. }
  92. /**
  93. * @brief This function handles Debug Monitor exception.
  94. * @param None
  95. * @retval None
  96. */
  97. void DebugMon_Handler(void)
  98. {
  99. }
  100. //void SysTick_Handler(void)
  101. //{
  102. // // definition in boarc.c
  103. //}
  104. /******************************************************************************/
  105. /* STM32F10x Peripherals Interrupt Handlers */
  106. /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
  107. /* available peripheral interrupt handler's name please refer to the startup */
  108. /* file (startup_stm32f10x_xx.s). */
  109. /******************************************************************************/
  110. #ifdef RT_USING_LWIP
  111. /*******************************************************************************
  112. * Function Name : EXTI4_IRQHandler
  113. * Description : This function handles External lines 9 to 5 interrupt request.
  114. * Input : None
  115. * Output : None
  116. * Return : None
  117. *******************************************************************************/
  118. void EXTI4_IRQHandler(void)
  119. {
  120. extern void rt_dm9000_isr(void);
  121. /* enter interrupt */
  122. rt_interrupt_enter();
  123. /* Clear the DM9000A EXTI line pending bit */
  124. EXTI_ClearITPendingBit(EXTI_Line4);
  125. rt_dm9000_isr();
  126. /* leave interrupt */
  127. rt_interrupt_leave();
  128. }
  129. #endif /* RT_USING_LWIP */
  130. #ifndef STM32F10X_CL
  131. /* CAN and USB IRQ for stm32 none connectivity line devices
  132. */
  133. void USB_LP_CAN1_RX0_IRQHandler(void)
  134. {
  135. #ifdef RT_USING_CAN
  136. CAN1_RX0_IRQHandler();
  137. #endif
  138. }
  139. void USB_HP_CAN1_TX_IRQHandler(void)
  140. {
  141. #ifdef RT_USING_CAN
  142. CAN1_TX_IRQHandler();
  143. #endif
  144. }
  145. #endif
  146. /**
  147. * @}
  148. */
  149. /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/