cmsis_5410x.h 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /*
  2. * @brief Basic CMSIS include file for LPC5410x M4 core
  3. *
  4. * @note
  5. * Copyright(C) NXP Semiconductors, 2014
  6. * All rights reserved.
  7. *
  8. * @par
  9. * Software that is described herein is for illustrative purposes only
  10. * which provides customers with programming information regarding the
  11. * LPC products. This software is supplied "AS IS" without any warranties of
  12. * any kind, and NXP Semiconductors and its licensor disclaim any and
  13. * all warranties, express or implied, including all implied warranties of
  14. * merchantability, fitness for a particular purpose and non-infringement of
  15. * intellectual property rights. NXP Semiconductors assumes no responsibility
  16. * or liability for the use of the software, conveys no license or rights under any
  17. * patent, copyright, mask work right, or any other intellectual property rights in
  18. * or to any products. NXP Semiconductors reserves the right to make changes
  19. * in the software without notification. NXP Semiconductors also makes no
  20. * representation or warranty that such application will be suitable for the
  21. * specified use without further testing or modification.
  22. *
  23. * @par
  24. * Permission to use, copy, modify, and distribute this software and its
  25. * documentation is hereby granted, under NXP Semiconductors' and its
  26. * licensor's relevant copyrights in the software, without fee, provided that it
  27. * is used in conjunction with NXP Semiconductors microcontrollers. This
  28. * copyright, permission, and disclaimer notice must appear in all copies of
  29. * this code.
  30. */
  31. #ifndef __CMSIS_5410X_H_
  32. #define __CMSIS_5410X_H_
  33. #include "lpc_types.h"
  34. #include "sys_config.h"
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. /** @defgroup CMSIS_5410X_M4 CHIP: LPC5410X M4 core CMSIS include file
  39. * @ingroup CHIP_5410X_CMSIS_DRIVERS
  40. * @{
  41. */
  42. #if defined(__ARMCC_VERSION)
  43. // Kill warning "#pragma push with no matching #pragma pop"
  44. #pragma diag_suppress 2525
  45. #pragma push
  46. #pragma anon_unions
  47. #elif defined(__CWCC__)
  48. #pragma push
  49. #pragma cpp_extensions on
  50. #elif defined(__GNUC__)
  51. /* anonymous unions are enabled by default */
  52. #elif defined(__IAR_SYSTEMS_ICC__)
  53. // #pragma push // FIXME not usable for IAR
  54. #pragma language=extended
  55. #else
  56. #error Not supported compiler type
  57. #endif
  58. /*
  59. * ==========================================================================
  60. * ---------- Interrupt Number Definition -----------------------------------
  61. * ==========================================================================
  62. */
  63. #if !defined(CORE_M4)
  64. #error "CORE_M4 is not defined"
  65. #endif
  66. /** @defgroup CMSIS_5410X_M4_IRQ CHIP_5410X: LPC5410X M4 core peripheral interrupt numbers
  67. * @{
  68. */
  69. typedef enum {
  70. /****** Cortex-M4 Processor Exceptions Numbers ***************************************************/
  71. Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset */
  72. NonMaskableInt_IRQn = -14, /*!< 2 Non maskable Interrupt, cannot be stopped or preempted */
  73. HardFault_IRQn = -13, /*!< 3 Hard Fault, all classes of Fault */
  74. MemoryManagement_IRQn = -12, /*!< 4 Memory Management, MPU mismatch, including Access Violation and No Match */
  75. BusFault_IRQn = -11, /*!< 5 Bus Fault, Pre-Fetch-, Memory Access Fault, other address/memory related Fault */
  76. UsageFault_IRQn = -10, /*!< 6 Usage Fault, i.e. Undef Instruction, Illegal State Transition */
  77. SVCall_IRQn = -5, /*!< 11 System Service Call via SVC instruction */
  78. DebugMonitor_IRQn = -4, /*!< 12 Debug Monitor */
  79. PendSV_IRQn = -2, /*!< 14 Pendable request for system service */
  80. SysTick_IRQn = -1, /*!< 15 System Tick Timer */
  81. /****** LPC5410X Specific Interrupt Numbers ********************************************************/
  82. WDT_IRQn = 0, /*!< WWDT */
  83. BOD_IRQn = 1, /*!< BOD */
  84. Reserved2_IRQn = 2, /*!< Reserved Interrupt */
  85. DMA_IRQn = 3, /*!< DMA */
  86. GINT0_IRQn = 4, /*!< GINT0 */
  87. PIN_INT0_IRQn = 5, /*!< PININT0 */
  88. PIN_INT1_IRQn = 6, /*!< PININT1 */
  89. PIN_INT2_IRQn = 7, /*!< PININT2 */
  90. PIN_INT3_IRQn = 8, /*!< PININT3 */
  91. UTICK_IRQn = 9, /*!< Micro-tick Timer interrupt */
  92. MRT_IRQn = 10, /*!< Multi-rate timer interrupt */
  93. CT32B0_IRQn = 11, /*!< CTMR0 */
  94. CT32B1_IRQn = 12, /*!< CTMR1 */
  95. CT32B2_IRQn = 13, /*!< CTMR2 */
  96. CT32B3_IRQn = 14, /*!< CTMR3 */
  97. CT32B4_IRQn = 15, /*!< CTMR4 */
  98. SCT0_IRQn = 16, /*!< SCT */
  99. UART0_IRQn = 17, /*!< UART0 */
  100. UART1_IRQn = 18, /*!< UART1 */
  101. UART2_IRQn = 19, /*!< UART2 */
  102. UART3_IRQn = 20, /*!< UART3 */
  103. I2C0_IRQn = 21, /*!< I2C0 */
  104. I2C1_IRQn = 22, /*!< I2C1 */
  105. I2C2_IRQn = 23, /*!< I2C2 */
  106. SPI0_IRQn = 24, /*!< SPI0 */
  107. SPI1_IRQn = 25, /*!< SPI1 */
  108. ADC_SEQA_IRQn = 26, /*!< ADC0 sequence A completion */
  109. ADC_SEQB_IRQn = 27, /*!< ADC0 sequence B completion */
  110. ADC_THCMP_IRQn = 28, /*!< ADC0 threshold compare and error */
  111. RTC_IRQn = 29, /*!< RTC alarm and wake-up interrupts */
  112. Reserved30_IRQn = 30, /*!< Reserved Interrupt */
  113. MAILBOX_IRQn = 31, /*!< Mailbox */
  114. GINT1_IRQn = 32, /*!< GINT1 */
  115. PIN_INT4_IRQn = 33, /*!< External Interrupt 4 */
  116. PIN_INT5_IRQn = 34, /*!< External Interrupt 5 */
  117. PIN_INT6_IRQn = 35, /*!< External Interrupt 6 */
  118. PIN_INT7_IRQn = 36, /*!< External Interrupt 7 */
  119. Reserved37_IRQn = 37, /*!< Reserved Interrupt */
  120. Reserved38_IRQn = 38, /*!< Reserved Interrupt */
  121. Reserved39_IRQn = 39, /*!< Reserved Interrupt */
  122. RIT_IRQn = 40, /*!< Repetitive Interrupt Timer */
  123. Reserved41_IRQn = 41, /*!< Reserved Interrupt */
  124. Reserved42_IRQn = 42, /*!< Reserved Interrupt */
  125. Reserved43_IRQn = 43, /*!< Reserved Interrupt */
  126. Reserved44_IRQn = 44, /*!< Reserved Interrupt */
  127. } LPC5410X_IRQn_Type;
  128. /**
  129. * @}
  130. */
  131. /*
  132. * ==========================================================================
  133. * ----------- Processor and Core Peripheral Section ------------------------
  134. * ==========================================================================
  135. */
  136. /** @defgroup CMSIS_5410X_M4_COMMON CHIP: LPC5410X M4 core Cortex CMSIS definitions
  137. * @{
  138. */
  139. /* Configuration of the Cortex-M4 Processor and Core Peripherals */
  140. #define __CM4_REV 0x0001 /*!< Cortex-M4 Core Revision */
  141. #define __MPU_PRESENT 1 /*!< MPU present or not */
  142. #define __NVIC_PRIO_BITS 3 /*!< Number of Bits used for Priority Levels */
  143. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  144. #define __FPU_PRESENT 1
  145. /**
  146. * @}
  147. */
  148. /**
  149. * @}
  150. */
  151. #ifdef __cplusplus
  152. }
  153. #endif
  154. #endif /* __CMSIS_5410X_H_ */