hw_ints.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /******************************************************************************
  2. * Filename: hw_ints.h
  3. * Revised: $Date: 2013-04-29 09:49:55 +0200 (Mon, 29 Apr 2013) $
  4. * Revision: $Revision: 9923 $
  5. *
  6. * Description: Macros that define the interrupt assignment on Stellaris.
  7. *
  8. * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  9. *
  10. *
  11. * Redistribution and use in source and binary forms, with or without
  12. * modification, are permitted provided that the following conditions
  13. * are met:
  14. *
  15. * Redistributions of source code must retain the above copyright
  16. * notice, this list of conditions and the following disclaimer.
  17. *
  18. * Redistributions in binary form must reproduce the above copyright
  19. * notice, this list of conditions and the following disclaimer in the
  20. * documentation and/or other materials provided with the distribution.
  21. *
  22. * Neither the name of Texas Instruments Incorporated nor the names of
  23. * its contributors may be used to endorse or promote products derived
  24. * from this software without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  27. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  28. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  29. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  30. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  31. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  32. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  33. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  34. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  35. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  36. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. ******************************************************************************/
  39. #ifndef __HW_INTS_H__
  40. #define __HW_INTS_H__
  41. // Note: Use the following define if alternate interrupt map is to be used.
  42. // This map is smaller. The function IntAltMapEnable() must be called
  43. // to enable The alternate map.
  44. // #define CC2538_USE_ALTERNATE_INTERRUPT_MAP 1
  45. //*****************************************************************************
  46. //
  47. // The following are defines for the fault assignments.
  48. //
  49. //*****************************************************************************
  50. #define FAULT_NMI 2 // NMI fault
  51. #define FAULT_HARD 3 // Hard fault
  52. #define FAULT_MPU 4 // MPU fault
  53. #define FAULT_BUS 5 // Bus fault
  54. #define FAULT_USAGE 6 // Usage fault
  55. #define FAULT_SVCALL 11 // SVCall
  56. #define FAULT_DEBUG 12 // Debug monitor
  57. #define FAULT_PENDSV 14 // PendSV
  58. #define FAULT_SYSTICK 15 // System Tick
  59. //*****************************************************************************
  60. //
  61. // The following are defines for the interrupt assignments.
  62. //
  63. //*****************************************************************************
  64. #define INT_GPIOA 16 // GPIO Port A
  65. #define INT_GPIOB 17 // GPIO Port B
  66. #define INT_GPIOC 18 // GPIO Port C
  67. #define INT_GPIOD 19 // GPIO Port D
  68. // 20 not in use
  69. #define INT_UART0 21 // UART0 Rx and Tx
  70. #define INT_UART1 22 // UART1 Rx and Tx
  71. #define INT_SSI0 23 // SSI0 Rx and Tx
  72. #define INT_I2C0 24 // I2C0 Master and Slave
  73. // 25 - 29 not in use
  74. #define INT_ADC0 30 // ADC0 Sequence 0
  75. // 31 - 33 not in use
  76. #define INT_WATCHDOG 34 // Watchdog timer
  77. #define INT_WATCHDOG0 34 // Watchdog Timer0
  78. #define INT_TIMER0A 35 // Timer 0 subtimer A
  79. #define INT_TIMER0B 36 // Timer 0 subtimer B
  80. #define INT_TIMER1A 37 // Timer 1 subtimer A
  81. #define INT_TIMER1B 38 // Timer 1 subtimer B
  82. #define INT_TIMER2A 39 // Timer 2 subtimer A
  83. #define INT_TIMER2B 40 // Timer 2 subtimer B
  84. #define INT_COMP0 41 // Analog Comparator 0
  85. // 42 - 44 only in use for alternate map
  86. #ifdef CC2538_USE_ALTERNATE_INTERRUPT_MAP
  87. #define INT_RFCORERTX 42 // RFCORE RX/TX
  88. #define INT_RFCOREERR 43 // RFCORE Error
  89. #define INT_ICEPICK 44 // Icepick
  90. #endif // CC2538_USE_ALTERNATE_INTERRUPT_MAP
  91. #define INT_FLASH 45 // FLASH Control
  92. // 46 - 49 only in use for alternate map
  93. #ifdef CC2538_USE_ALTERNATE_INTERRUPT_MAP
  94. #define INT_AES 46 // AES
  95. #define INT_PKA 47 // PKA
  96. #define INT_SMTIM 48 // SMTimer
  97. #define INT_MACTIMR 49 // MACTimer
  98. #endif // CC2538_USE_ALTERNATE_INTERRUPT_MAP
  99. #define INT_SSI1 50 // SSI1 Rx and Tx
  100. #define INT_TIMER3A 51 // Timer 3 subtimer A
  101. #define INT_TIMER3B 52 // Timer 3 subtimer B
  102. // 53 - 59 not in use
  103. // 60 only in use for alternate map
  104. #ifdef CC2538_USE_ALTERNATE_INTERRUPT_MAP
  105. #define INT_USB2538 60 // USB new for 2538
  106. #endif // CC2538_USE_ALTERNATE_INTERRUPT_MAP
  107. // 61 not in use
  108. #define INT_UDMA 62 // uDMA controller
  109. #define INT_UDMAERR 63 // uDMA Error
  110. // 64 - 155 not in use
  111. // 156-162 only in use in basic map
  112. #ifndef CC2538_USE_ALTERNATE_INTERRUPT_MAP
  113. #define INT_USB2538 156 // USB new for 2538
  114. #define INT_RFCORERTX 157 // RFCORE RX/TX
  115. #define INT_RFCOREERR 158 // RFCORE Error
  116. #define INT_AES 159 // AES
  117. #define INT_PKA 160 // PKA
  118. #define INT_SMTIM 161 // SMTimer
  119. #define INT_MACTIMR 162 // MACTimer
  120. #endif // not CC2538_USE_ALTERNATE_INTERRUPT_MAP
  121. //*****************************************************************************
  122. //
  123. // The following are defines for the total number of interrupts.
  124. //
  125. //*****************************************************************************
  126. #ifdef CC2538_USE_ALTERNATE_INTERRUPT_MAP
  127. #define NUM_INTERRUPTS 64
  128. #else
  129. #define NUM_INTERRUPTS 163
  130. #endif // CC2538_USE_ALTERNATE_INTERRUPT_MAP
  131. //*****************************************************************************
  132. //
  133. // The following are defines for the total number of priority levels.
  134. //
  135. //*****************************************************************************
  136. #define NUM_PRIORITY 8
  137. #define NUM_PRIORITY_BITS 3
  138. #endif // __HW_INTS_H__