ARMCA7.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /******************************************************************************
  2. * @file ARMCA7.h
  3. * @brief CMSIS Cortex-A7 Core Peripheral Access Layer Header File
  4. * @version V1.1.0
  5. * @date 15. May 2019
  6. *
  7. * @note
  8. *
  9. ******************************************************************************/
  10. /*
  11. * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
  12. *
  13. * SPDX-License-Identifier: Apache-2.0
  14. *
  15. * Licensed under the Apache License, Version 2.0 (the License); you may
  16. * not use this file except in compliance with the License.
  17. * You may obtain a copy of the License at
  18. *
  19. * www.apache.org/licenses/LICENSE-2.0
  20. *
  21. * Unless required by applicable law or agreed to in writing, software
  22. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  23. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24. * See the License for the specific language governing permissions and
  25. * limitations under the License.
  26. */
  27. #ifndef __ARMCA7_H__
  28. #define __ARMCA7_H__
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. /* ------------------------- Interrupt Number Definition ------------------------ */
  33. /** Device specific Interrupt IDs */
  34. typedef enum IRQn
  35. {
  36. /****** SGI Interrupts Numbers ****************************************/
  37. SGI0_IRQn = 0, /*!< Software Generated Interrupt 0 */
  38. SGI1_IRQn = 1, /*!< Software Generated Interrupt 1 */
  39. SGI2_IRQn = 2, /*!< Software Generated Interrupt 2 */
  40. SGI3_IRQn = 3, /*!< Software Generated Interrupt 3 */
  41. SGI4_IRQn = 4, /*!< Software Generated Interrupt 4 */
  42. SGI5_IRQn = 5, /*!< Software Generated Interrupt 5 */
  43. SGI6_IRQn = 6, /*!< Software Generated Interrupt 6 */
  44. SGI7_IRQn = 7, /*!< Software Generated Interrupt 7 */
  45. SGI8_IRQn = 8, /*!< Software Generated Interrupt 8 */
  46. SGI9_IRQn = 9, /*!< Software Generated Interrupt 9 */
  47. SGI10_IRQn = 10, /*!< Software Generated Interrupt 10 */
  48. SGI11_IRQn = 11, /*!< Software Generated Interrupt 11 */
  49. SGI12_IRQn = 12, /*!< Software Generated Interrupt 12 */
  50. SGI13_IRQn = 13, /*!< Software Generated Interrupt 13 */
  51. SGI14_IRQn = 14, /*!< Software Generated Interrupt 14 */
  52. SGI15_IRQn = 15, /*!< Software Generated Interrupt 15 */
  53. /****** Cortex-A7 Processor Exceptions Numbers ****************************************/
  54. SecurePhyTimer_IRQn = 29, /*!< Physical Timer Interrupt */
  55. /****** Platform Exceptions Numbers ***************************************************/
  56. Watchdog_IRQn = 32, /*!< SP805 Interrupt */
  57. Timer0_IRQn = 34, /*!< SP804 Interrupt */
  58. Timer1_IRQn = 35, /*!< SP804 Interrupt */
  59. RTClock_IRQn = 36, /*!< PL031 Interrupt */
  60. UART0_IRQn = 37, /*!< PL011 Interrupt */
  61. UART1_IRQn = 38, /*!< PL011 Interrupt */
  62. UART2_IRQn = 39, /*!< PL011 Interrupt */
  63. UART3_IRQn = 40, /*!< PL011 Interrupt */
  64. MCI0_IRQn = 41, /*!< PL180 Interrupt (1st) */
  65. MCI1_IRQn = 42, /*!< PL180 Interrupt (2nd) */
  66. AACI_IRQn = 43, /*!< PL041 Interrupt */
  67. Keyboard_IRQn = 44, /*!< PL050 Interrupt */
  68. Mouse_IRQn = 45, /*!< PL050 Interrupt */
  69. CLCD_IRQn = 46, /*!< PL111 Interrupt */
  70. Ethernet_IRQn = 47, /*!< SMSC_91C111 Interrupt */
  71. VFS2_IRQn = 73, /*!< VFS2 Interrupt */
  72. } IRQn_Type;
  73. /******************************************************************************/
  74. /* Peripheral memory map */
  75. /******************************************************************************/
  76. /* Peripheral and RAM base address */
  77. #define VE_A7_MP_FLASH_BASE0 (0x00000000UL) /*!< (FLASH0 ) Base Address */
  78. #define VE_A7_MP_FLASH_BASE1 (0x0C000000UL) /*!< (FLASH1 ) Base Address */
  79. #define VE_A7_MP_SRAM_BASE (0x14000000UL) /*!< (SRAM ) Base Address */
  80. #define VE_A7_MP_PERIPH_BASE_CS2 (0x18000000UL) /*!< (Peripheral ) Base Address */
  81. #define VE_A7_MP_VRAM_BASE (0x00000000UL + VE_A7_MP_PERIPH_BASE_CS2) /*!< (VRAM ) Base Address */
  82. #define VE_A7_MP_ETHERNET_BASE (0x02000000UL + VE_A7_MP_PERIPH_BASE_CS2) /*!< (ETHERNET ) Base Address */
  83. #define VE_A7_MP_USB_BASE (0x03000000UL + VE_A7_MP_PERIPH_BASE_CS2) /*!< (USB ) Base Address */
  84. #define VE_A7_MP_PERIPH_BASE_CS3 (0x1C000000UL) /*!< (Peripheral ) Base Address */
  85. #define VE_A7_MP_DAP_BASE (0x00000000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (LOCAL DAP ) Base Address */
  86. #define VE_A7_MP_SYSTEM_REG_BASE (0x00010000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (SYSTEM REG ) Base Address */
  87. #define VE_A7_MP_SERIAL_BASE (0x00030000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (SERIAL ) Base Address */
  88. #define VE_A7_MP_AACI_BASE (0x00040000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (AACI ) Base Address */
  89. #define VE_A7_MP_MMCI_BASE (0x00050000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (MMCI ) Base Address */
  90. #define VE_A7_MP_KMI0_BASE (0x00060000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (KMI0 ) Base Address */
  91. #define VE_A7_MP_UART_BASE (0x00090000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (UART ) Base Address */
  92. #define VE_A7_MP_WDT_BASE (0x000F0000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (WDT ) Base Address */
  93. #define VE_A7_MP_TIMER_BASE (0x00110000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (TIMER ) Base Address */
  94. #define VE_A7_MP_DVI_BASE (0x00160000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (DVI ) Base Address */
  95. #define VE_A7_MP_RTC_BASE (0x00170000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (RTC ) Base Address */
  96. #define VE_A7_MP_UART4_BASE (0x001B0000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (UART4 ) Base Address */
  97. #define VE_A7_MP_CLCD_BASE (0x001F0000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (CLCD ) Base Address */
  98. #define VE_A7_MP_PRIVATE_PERIPH_BASE (0x2C000000UL) /*!< (Peripheral ) Base Address */
  99. #define VE_A7_MP_GIC_DISTRIBUTOR_BASE (0x00001000UL + VE_A7_MP_PRIVATE_PERIPH_BASE) /*!< (GIC DIST ) Base Address */
  100. #define VE_A7_MP_GIC_INTERFACE_BASE (0x00002000UL + VE_A7_MP_PRIVATE_PERIPH_BASE) /*!< (GIC CPU IF ) Base Address */
  101. #define VE_A7_MP_PL310_BASE (0x000F0000UL + VE_A7_MP_PRIVATE_PERIPH_BASE) /*!< (L2C-310 ) Base Address */
  102. #define VE_A7_MP_SSRAM_BASE (0x2E000000UL) /*!< (System SRAM) Base Address */
  103. #define VE_A7_MP_DRAM_BASE (0x80000000UL) /*!< (DRAM ) Base Address */
  104. #define GIC_DISTRIBUTOR_BASE VE_A7_MP_GIC_DISTRIBUTOR_BASE
  105. #define GIC_INTERFACE_BASE VE_A7_MP_GIC_INTERFACE_BASE
  106. //The VE-A7 model implements L1 cache as architecturally defined, but does not implement L2 cache.
  107. //Do not enable the L2 cache if you are running RTX on a VE-A7 model as it may cause a data abort.
  108. #define L2C_310_BASE VE_A7_MP_PL310_BASE
  109. /* -------- Configuration of the Cortex-A7 Processor and Core Peripherals ------- */
  110. #define __CA_REV 0x0000U /* Core revision r0p0 */
  111. #define __CORTEX_A 7U /* Cortex-A7 Core */
  112. #define __FPU_PRESENT 1U /* FPU present */
  113. #define __GIC_PRESENT 1U /* GIC present */
  114. #define __TIM_PRESENT 1U /* TIM present */
  115. #define __L2C_PRESENT 0U /* L2C present */
  116. #include "core_ca.h"
  117. #include <system_ARMCA7.h>
  118. #ifdef __cplusplus
  119. }
  120. #endif
  121. #endif // __ARMCA7_H__