cortex_nvic.c 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. /*******************************************************************************
  2. * (c) Copyright 2007-2013 Microsemi SoC Products Group. All rights reserved.
  3. *
  4. * Legacy Actel HAL Cortex NVIC control functions.
  5. * The use of these functions should be replaced by calls to the equivalent
  6. * CMSIS function in your application code.
  7. *
  8. * SVN $Revision: 7375 $
  9. * SVN $Date: 2015-05-01 19:27:40 +0530 (Fri, 01 May 2015) $
  10. */
  11. #include "cortex_nvic.h"
  12. #ifdef MSCC_NO_RELATIVE_PATHS
  13. #include "mss_assert.h"
  14. #else
  15. #include "../../CMSIS/mss_assert.h"
  16. #endif
  17. /***************************************************************************//**
  18. *
  19. */
  20. void NVIC_init( void )
  21. {
  22. /*
  23. * Please use the NVIC control functions provided by the SmartFusion2 CMSIS
  24. * Hardware Abstraction Layer. The use of the Actel HAL NVIC control
  25. * functions is obsolete on SmartFusion2 devices.
  26. *
  27. * Simply remove the call to NVIC_init() from your application code.
  28. */
  29. ASSERT(0);
  30. }
  31. /***************************************************************************//**
  32. *
  33. */
  34. void NVIC_set_handler
  35. (
  36. uint32_t interrupt_number,
  37. hal_nvic_irq_handler_t handler
  38. )
  39. {
  40. /*
  41. * Please use the NVIC control functions provided by the SmartFusion2 CMSIS
  42. * Hardware Abstraction Layer. The use of the Actel HAL NVIC control
  43. * functions is obsolete on SmartFusion2 devices.
  44. *
  45. * Please remove the call to NVIC_set_handler() from your application code
  46. * and provide a function using one of the following function prototypes to
  47. * handle interrupts from peripherals implemeted in the SmartFusion2 FPGA
  48. * fabric:
  49. * - void FabricIrq0_IRQHandler(void)
  50. * - void FabricIrq1_IRQHandler(void)
  51. * - void FabricIrq2_IRQHandler(void)
  52. * - void FabricIrq3_IRQHandler(void)
  53. * - void FabricIrq4_IRQHandler(void)
  54. * - void FabricIrq5_IRQHandler(void)
  55. * - void FabricIrq6_IRQHandler(void)
  56. * - void FabricIrq7_IRQHandler(void)
  57. * - void FabricIrq8_IRQHandler(void)
  58. * - void FabricIrq9_IRQHandler(void)
  59. * - void FabricIrq10_IRQHandler(void)
  60. * - void FabricIrq11_IRQHandler(void)
  61. * - void FabricIrq12_IRQHandler(void)
  62. * - void FabricIrq13_IRQHandler(void)
  63. * - void FabricIrq14_IRQHandler(void)
  64. * - void FabricIrq15_IRQHandler(void)
  65. * The function to implement depends on which MSS_INT_F2M[n] signal is used
  66. * in your Libero design to connect the interrupt signal of the peripheral
  67. * generating the interrupt.
  68. */
  69. ASSERT(0);
  70. }
  71. /***************************************************************************//**
  72. *
  73. */
  74. void NVIC_set_priority
  75. (
  76. uint32_t interrupt_number,
  77. uint8_t priority_level
  78. )
  79. {
  80. /*
  81. * Please use the NVIC control functions provided by the SmartFusion2 CMSIS
  82. * Hardware Abstraction Layer. The use of the Actel HAL NVIC control
  83. * functions is obsolete on SmartFusion2 devices.
  84. *
  85. * Please replace calls to NVIC_set_priority() with a call to the CMSIS
  86. * void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) function where
  87. * IRQn is one of the following values:
  88. * - FabricIrq0_IRQn
  89. * - FabricIrq1_IRQn
  90. * - FabricIrq2_IRQn
  91. * - FabricIrq3_IRQn
  92. * - FabricIrq4_IRQn
  93. * - FabricIrq5_IRQn
  94. * - FabricIrq6_IRQn
  95. * - FabricIrq7_IRQn
  96. * - FabricIrq8_IRQn
  97. * - FabricIrq9_IRQn
  98. * - FabricIrq10_IRQn
  99. * - FabricIrq11_IRQn
  100. * - FabricIrq12_IRQn
  101. * - FabricIrq13_IRQn
  102. * - FabricIrq14_IRQn
  103. * - FabricIrq15_IRQn
  104. */
  105. ASSERT(0);
  106. }
  107. /***************************************************************************//**
  108. *
  109. */
  110. void NVIC_enable_interrupt( uint32_t interrupt_number )
  111. {
  112. /*
  113. * Please use the NVIC control functions provided by the SmartFusion2 CMSIS
  114. * Hardware Abstraction Layer. The use of the Actel HAL NVIC control
  115. * functions is obsolete on SmartFusion2 devices.
  116. *
  117. * Please replace calls to NVIC_enable_interrupt() with a call to the CMSIS
  118. * void NVIC_EnableIRQ(IRQn_Type IRQn) function where IRQn is one of the
  119. * following values:
  120. * - FabricIrq0_IRQn
  121. * - FabricIrq1_IRQn
  122. * - FabricIrq2_IRQn
  123. * - FabricIrq3_IRQn
  124. * - FabricIrq4_IRQn
  125. * - FabricIrq5_IRQn
  126. * - FabricIrq6_IRQn
  127. * - FabricIrq7_IRQn
  128. * - FabricIrq8_IRQn
  129. * - FabricIrq9_IRQn
  130. * - FabricIrq10_IRQn
  131. * - FabricIrq11_IRQn
  132. * - FabricIrq12_IRQn
  133. * - FabricIrq13_IRQn
  134. * - FabricIrq14_IRQn
  135. * - FabricIrq15_IRQn
  136. */
  137. ASSERT(0);
  138. }
  139. /***************************************************************************//**
  140. *
  141. */
  142. void NVIC_disable_interrupt( uint32_t interrupt_number )
  143. {
  144. /*
  145. * Please use the NVIC control functions provided by the SmartFusion2 CMSIS
  146. * Hardware Abstraction Layer. The use of the Actel HAL NVIC control
  147. * functions is obsolete on SmartFusion2 devices.
  148. *
  149. * Please replace calls to NVIC_disable_interrupt() with a call to the CMSIS
  150. * void NVIC_DisableIRQ(IRQn_Type IRQn) function where IRQn is one of the
  151. * following values:
  152. * - FabricIrq0_IRQn
  153. * - FabricIrq1_IRQn
  154. * - FabricIrq2_IRQn
  155. * - FabricIrq3_IRQn
  156. * - FabricIrq4_IRQn
  157. * - FabricIrq5_IRQn
  158. * - FabricIrq6_IRQn
  159. * - FabricIrq7_IRQn
  160. * - FabricIrq8_IRQn
  161. * - FabricIrq9_IRQn
  162. * - FabricIrq10_IRQn
  163. * - FabricIrq11_IRQn
  164. * - FabricIrq12_IRQn
  165. * - FabricIrq13_IRQn
  166. * - FabricIrq14_IRQn
  167. * - FabricIrq15_IRQn
  168. */
  169. ASSERT(0);
  170. }
  171. /***************************************************************************//**
  172. *
  173. */
  174. void NVIC_clear_interrupt( uint32_t interrupt_number )
  175. {
  176. /*
  177. * Please use the NVIC control functions provided by the SmartFusion2 CMSIS
  178. * Hardware Abstraction Layer. The use of the Actel HAL NVIC control
  179. * functions is obsolete on SmartFusion2 devices.
  180. *
  181. * Please replace calls to NVIC_clear_interrupt() with a call to the CMSIS
  182. * void NVIC_ClearPendingIRQ(IRQn_Type IRQn) function where IRQn is one of the
  183. * following values:
  184. * - FabricIrq0_IRQn
  185. * - FabricIrq1_IRQn
  186. * - FabricIrq2_IRQn
  187. * - FabricIrq3_IRQn
  188. * - FabricIrq4_IRQn
  189. * - FabricIrq5_IRQn
  190. * - FabricIrq6_IRQn
  191. * - FabricIrq7_IRQn
  192. * - FabricIrq8_IRQn
  193. * - FabricIrq9_IRQn
  194. * - FabricIrq10_IRQn
  195. * - FabricIrq11_IRQn
  196. * - FabricIrq12_IRQn
  197. * - FabricIrq13_IRQn
  198. * - FabricIrq14_IRQn
  199. * - FabricIrq15_IRQn
  200. */
  201. ASSERT(0);
  202. }