Implement a secure ICS protocol targeting LoRa Node151 microcontroller for controlling irrigation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

207 lines
5.3 KiB

  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file stm32l1xx_it.c
  5. * @brief Interrupt Service Routines.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Includes ------------------------------------------------------------------*/
  21. #include "main.h"
  22. #include "stm32l1xx_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 PCD_HandleTypeDef hpcd_USB_FS;
  46. extern TIM_HandleTypeDef htim4;
  47. /* USER CODE BEGIN EV */
  48. /* USER CODE END EV */
  49. /******************************************************************************/
  50. /* Cortex-M3 Processor Interruption and Exception Handlers */
  51. /******************************************************************************/
  52. /**
  53. * @brief This function handles Non maskable interrupt.
  54. */
  55. void NMI_Handler(void)
  56. {
  57. /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  58. /* USER CODE END NonMaskableInt_IRQn 0 */
  59. /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  60. /* USER CODE END NonMaskableInt_IRQn 1 */
  61. }
  62. /**
  63. * @brief This function handles Hard fault interrupt.
  64. */
  65. void HardFault_Handler(void)
  66. {
  67. /* USER CODE BEGIN HardFault_IRQn 0 */
  68. /* USER CODE END HardFault_IRQn 0 */
  69. while (1)
  70. {
  71. /* USER CODE BEGIN W1_HardFault_IRQn 0 */
  72. /* USER CODE END W1_HardFault_IRQn 0 */
  73. }
  74. }
  75. /**
  76. * @brief This function handles Memory management fault.
  77. */
  78. void MemManage_Handler(void)
  79. {
  80. /* USER CODE BEGIN MemoryManagement_IRQn 0 */
  81. /* USER CODE END MemoryManagement_IRQn 0 */
  82. while (1)
  83. {
  84. /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
  85. /* USER CODE END W1_MemoryManagement_IRQn 0 */
  86. }
  87. }
  88. /**
  89. * @brief This function handles Pre-fetch fault, memory access fault.
  90. */
  91. void BusFault_Handler(void)
  92. {
  93. /* USER CODE BEGIN BusFault_IRQn 0 */
  94. /* USER CODE END BusFault_IRQn 0 */
  95. while (1)
  96. {
  97. /* USER CODE BEGIN W1_BusFault_IRQn 0 */
  98. /* USER CODE END W1_BusFault_IRQn 0 */
  99. }
  100. }
  101. /**
  102. * @brief This function handles Undefined instruction or illegal state.
  103. */
  104. void UsageFault_Handler(void)
  105. {
  106. /* USER CODE BEGIN UsageFault_IRQn 0 */
  107. /* USER CODE END UsageFault_IRQn 0 */
  108. while (1)
  109. {
  110. /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
  111. /* USER CODE END W1_UsageFault_IRQn 0 */
  112. }
  113. }
  114. /**
  115. * @brief This function handles System service call via SWI instruction.
  116. */
  117. void SVC_Handler(void)
  118. {
  119. /* USER CODE BEGIN SVC_IRQn 0 */
  120. /* USER CODE END SVC_IRQn 0 */
  121. /* USER CODE BEGIN SVC_IRQn 1 */
  122. /* USER CODE END SVC_IRQn 1 */
  123. }
  124. /**
  125. * @brief This function handles Debug monitor.
  126. */
  127. void DebugMon_Handler(void)
  128. {
  129. /* USER CODE BEGIN DebugMonitor_IRQn 0 */
  130. /* USER CODE END DebugMonitor_IRQn 0 */
  131. /* USER CODE BEGIN DebugMonitor_IRQn 1 */
  132. /* USER CODE END DebugMonitor_IRQn 1 */
  133. }
  134. /**
  135. * @brief This function handles Pendable request for system service.
  136. */
  137. void PendSV_Handler(void)
  138. {
  139. /* USER CODE BEGIN PendSV_IRQn 0 */
  140. /* USER CODE END PendSV_IRQn 0 */
  141. /* USER CODE BEGIN PendSV_IRQn 1 */
  142. /* USER CODE END PendSV_IRQn 1 */
  143. }
  144. /******************************************************************************/
  145. /* STM32L1xx Peripheral Interrupt Handlers */
  146. /* Add here the Interrupt Handlers for the used peripherals. */
  147. /* For the available peripheral interrupt handler names, */
  148. /* please refer to the startup file (startup_stm32l1xx.s). */
  149. /******************************************************************************/
  150. /**
  151. * @brief This function handles TIM4 global interrupt.
  152. */
  153. void TIM4_IRQHandler(void)
  154. {
  155. /* USER CODE BEGIN TIM4_IRQn 0 */
  156. /* USER CODE END TIM4_IRQn 0 */
  157. #if 0
  158. HAL_TIM_IRQHandler(&htim4);
  159. #endif
  160. /* USER CODE BEGIN TIM4_IRQn 1 */
  161. /* USER CODE END TIM4_IRQn 1 */
  162. }
  163. /* USER CODE BEGIN 1 */
  164. /* USER CODE END 1 */
  165. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/