Dataloger

Committer:
jhon309
Date:
Thu Aug 20 00:37:14 2015 +0000
Revision:
0:666850d06c9f
ok

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jhon309 0:666850d06c9f 1 /**************************************************************************//**
jhon309 0:666850d06c9f 2 * @file core_ca9.h
jhon309 0:666850d06c9f 3 * @brief CMSIS Cortex-A9 Core Peripheral Access Layer Header File
jhon309 0:666850d06c9f 4 * @version
jhon309 0:666850d06c9f 5 * @date 25 March 2013
jhon309 0:666850d06c9f 6 *
jhon309 0:666850d06c9f 7 * @note
jhon309 0:666850d06c9f 8 *
jhon309 0:666850d06c9f 9 ******************************************************************************/
jhon309 0:666850d06c9f 10 /* Copyright (c) 2009 - 2012 ARM LIMITED
jhon309 0:666850d06c9f 11
jhon309 0:666850d06c9f 12 All rights reserved.
jhon309 0:666850d06c9f 13 Redistribution and use in source and binary forms, with or without
jhon309 0:666850d06c9f 14 modification, are permitted provided that the following conditions are met:
jhon309 0:666850d06c9f 15 - Redistributions of source code must retain the above copyright
jhon309 0:666850d06c9f 16 notice, this list of conditions and the following disclaimer.
jhon309 0:666850d06c9f 17 - Redistributions in binary form must reproduce the above copyright
jhon309 0:666850d06c9f 18 notice, this list of conditions and the following disclaimer in the
jhon309 0:666850d06c9f 19 documentation and/or other materials provided with the distribution.
jhon309 0:666850d06c9f 20 - Neither the name of ARM nor the names of its contributors may be used
jhon309 0:666850d06c9f 21 to endorse or promote products derived from this software without
jhon309 0:666850d06c9f 22 specific prior written permission.
jhon309 0:666850d06c9f 23 *
jhon309 0:666850d06c9f 24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
jhon309 0:666850d06c9f 25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
jhon309 0:666850d06c9f 26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
jhon309 0:666850d06c9f 27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
jhon309 0:666850d06c9f 28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
jhon309 0:666850d06c9f 29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
jhon309 0:666850d06c9f 30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
jhon309 0:666850d06c9f 31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
jhon309 0:666850d06c9f 32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
jhon309 0:666850d06c9f 33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
jhon309 0:666850d06c9f 34 POSSIBILITY OF SUCH DAMAGE.
jhon309 0:666850d06c9f 35 ---------------------------------------------------------------------------*/
jhon309 0:666850d06c9f 36
jhon309 0:666850d06c9f 37
jhon309 0:666850d06c9f 38 #if defined ( __ICCARM__ )
jhon309 0:666850d06c9f 39 #pragma system_include /* treat file as system include file for MISRA check */
jhon309 0:666850d06c9f 40 #endif
jhon309 0:666850d06c9f 41
jhon309 0:666850d06c9f 42 #ifdef __cplusplus
jhon309 0:666850d06c9f 43 extern "C" {
jhon309 0:666850d06c9f 44 #endif
jhon309 0:666850d06c9f 45
jhon309 0:666850d06c9f 46 #ifndef __CORE_CA9_H_GENERIC
jhon309 0:666850d06c9f 47 #define __CORE_CA9_H_GENERIC
jhon309 0:666850d06c9f 48
jhon309 0:666850d06c9f 49
jhon309 0:666850d06c9f 50 /** \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions
jhon309 0:666850d06c9f 51 CMSIS violates the following MISRA-C:2004 rules:
jhon309 0:666850d06c9f 52
jhon309 0:666850d06c9f 53 \li Required Rule 8.5, object/function definition in header file.<br>
jhon309 0:666850d06c9f 54 Function definitions in header files are used to allow 'inlining'.
jhon309 0:666850d06c9f 55
jhon309 0:666850d06c9f 56 \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.<br>
jhon309 0:666850d06c9f 57 Unions are used for effective representation of core registers.
jhon309 0:666850d06c9f 58
jhon309 0:666850d06c9f 59 \li Advisory Rule 19.7, Function-like macro defined.<br>
jhon309 0:666850d06c9f 60 Function-like macros are used to allow more efficient code.
jhon309 0:666850d06c9f 61 */
jhon309 0:666850d06c9f 62
jhon309 0:666850d06c9f 63
jhon309 0:666850d06c9f 64 /*******************************************************************************
jhon309 0:666850d06c9f 65 * CMSIS definitions
jhon309 0:666850d06c9f 66 ******************************************************************************/
jhon309 0:666850d06c9f 67 /** \ingroup Cortex_A9
jhon309 0:666850d06c9f 68 @{
jhon309 0:666850d06c9f 69 */
jhon309 0:666850d06c9f 70
jhon309 0:666850d06c9f 71 /* CMSIS CA9 definitions */
jhon309 0:666850d06c9f 72 #define __CA9_CMSIS_VERSION_MAIN (0x03) /*!< [31:16] CMSIS HAL main version */
jhon309 0:666850d06c9f 73 #define __CA9_CMSIS_VERSION_SUB (0x10) /*!< [15:0] CMSIS HAL sub version */
jhon309 0:666850d06c9f 74 #define __CA9_CMSIS_VERSION ((__CA9_CMSIS_VERSION_MAIN << 16) | \
jhon309 0:666850d06c9f 75 __CA9_CMSIS_VERSION_SUB ) /*!< CMSIS HAL version number */
jhon309 0:666850d06c9f 76
jhon309 0:666850d06c9f 77 #define __CORTEX_A (0x09) /*!< Cortex-A Core */
jhon309 0:666850d06c9f 78
jhon309 0:666850d06c9f 79
jhon309 0:666850d06c9f 80 #if defined ( __CC_ARM )
jhon309 0:666850d06c9f 81 #define __ASM __asm /*!< asm keyword for ARM Compiler */
jhon309 0:666850d06c9f 82 #define __INLINE __inline /*!< inline keyword for ARM Compiler */
jhon309 0:666850d06c9f 83 #define __STATIC_INLINE static __inline
jhon309 0:666850d06c9f 84 #define __STATIC_ASM static __asm
jhon309 0:666850d06c9f 85
jhon309 0:666850d06c9f 86 #elif defined ( __ICCARM__ )
jhon309 0:666850d06c9f 87 #define __ASM __asm /*!< asm keyword for IAR Compiler */
jhon309 0:666850d06c9f 88 #define __INLINE inline /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
jhon309 0:666850d06c9f 89 #define __STATIC_INLINE static inline
jhon309 0:666850d06c9f 90 #define __STATIC_ASM static __asm
jhon309 0:666850d06c9f 91
jhon309 0:666850d06c9f 92 #elif defined ( __TMS470__ )
jhon309 0:666850d06c9f 93 #define __ASM __asm /*!< asm keyword for TI CCS Compiler */
jhon309 0:666850d06c9f 94 #define __STATIC_INLINE static inline
jhon309 0:666850d06c9f 95 #define __STATIC_ASM static __asm
jhon309 0:666850d06c9f 96
jhon309 0:666850d06c9f 97 #elif defined ( __GNUC__ )
jhon309 0:666850d06c9f 98 #define __ASM __asm /*!< asm keyword for GNU Compiler */
jhon309 0:666850d06c9f 99 #define __INLINE inline /*!< inline keyword for GNU Compiler */
jhon309 0:666850d06c9f 100 #define __STATIC_INLINE static inline
jhon309 0:666850d06c9f 101 #define __STATIC_ASM static __asm
jhon309 0:666850d06c9f 102
jhon309 0:666850d06c9f 103 #elif defined ( __TASKING__ )
jhon309 0:666850d06c9f 104 #define __ASM __asm /*!< asm keyword for TASKING Compiler */
jhon309 0:666850d06c9f 105 #define __INLINE inline /*!< inline keyword for TASKING Compiler */
jhon309 0:666850d06c9f 106 #define __STATIC_INLINE static inline
jhon309 0:666850d06c9f 107 #define __STATIC_ASM static __asm
jhon309 0:666850d06c9f 108
jhon309 0:666850d06c9f 109 #endif
jhon309 0:666850d06c9f 110
jhon309 0:666850d06c9f 111 /** __FPU_USED indicates whether an FPU is used or not. For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
jhon309 0:666850d06c9f 112 */
jhon309 0:666850d06c9f 113 #if defined ( __CC_ARM )
jhon309 0:666850d06c9f 114 #if defined __TARGET_FPU_VFP
jhon309 0:666850d06c9f 115 #if (__FPU_PRESENT == 1)
jhon309 0:666850d06c9f 116 #define __FPU_USED 1
jhon309 0:666850d06c9f 117 #else
jhon309 0:666850d06c9f 118 #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
jhon309 0:666850d06c9f 119 #define __FPU_USED 0
jhon309 0:666850d06c9f 120 #endif
jhon309 0:666850d06c9f 121 #else
jhon309 0:666850d06c9f 122 #define __FPU_USED 0
jhon309 0:666850d06c9f 123 #endif
jhon309 0:666850d06c9f 124
jhon309 0:666850d06c9f 125 #elif defined ( __ICCARM__ )
jhon309 0:666850d06c9f 126 #if defined __ARMVFP__
jhon309 0:666850d06c9f 127 #if (__FPU_PRESENT == 1)
jhon309 0:666850d06c9f 128 #define __FPU_USED 1
jhon309 0:666850d06c9f 129 #else
jhon309 0:666850d06c9f 130 #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
jhon309 0:666850d06c9f 131 #define __FPU_USED 0
jhon309 0:666850d06c9f 132 #endif
jhon309 0:666850d06c9f 133 #else
jhon309 0:666850d06c9f 134 #define __FPU_USED 0
jhon309 0:666850d06c9f 135 #endif
jhon309 0:666850d06c9f 136
jhon309 0:666850d06c9f 137 #elif defined ( __TMS470__ )
jhon309 0:666850d06c9f 138 #if defined __TI_VFP_SUPPORT__
jhon309 0:666850d06c9f 139 #if (__FPU_PRESENT == 1)
jhon309 0:666850d06c9f 140 #define __FPU_USED 1
jhon309 0:666850d06c9f 141 #else
jhon309 0:666850d06c9f 142 #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
jhon309 0:666850d06c9f 143 #define __FPU_USED 0
jhon309 0:666850d06c9f 144 #endif
jhon309 0:666850d06c9f 145 #else
jhon309 0:666850d06c9f 146 #define __FPU_USED 0
jhon309 0:666850d06c9f 147 #endif
jhon309 0:666850d06c9f 148
jhon309 0:666850d06c9f 149 #elif defined ( __GNUC__ )
jhon309 0:666850d06c9f 150 #if defined (__VFP_FP__) && !defined(__SOFTFP__)
jhon309 0:666850d06c9f 151 #if (__FPU_PRESENT == 1)
jhon309 0:666850d06c9f 152 #define __FPU_USED 1
jhon309 0:666850d06c9f 153 #else
jhon309 0:666850d06c9f 154 #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
jhon309 0:666850d06c9f 155 #define __FPU_USED 0
jhon309 0:666850d06c9f 156 #endif
jhon309 0:666850d06c9f 157 #else
jhon309 0:666850d06c9f 158 #define __FPU_USED 0
jhon309 0:666850d06c9f 159 #endif
jhon309 0:666850d06c9f 160
jhon309 0:666850d06c9f 161 #elif defined ( __TASKING__ )
jhon309 0:666850d06c9f 162 #if defined __FPU_VFP__
jhon309 0:666850d06c9f 163 #if (__FPU_PRESENT == 1)
jhon309 0:666850d06c9f 164 #define __FPU_USED 1
jhon309 0:666850d06c9f 165 #else
jhon309 0:666850d06c9f 166 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
jhon309 0:666850d06c9f 167 #define __FPU_USED 0
jhon309 0:666850d06c9f 168 #endif
jhon309 0:666850d06c9f 169 #else
jhon309 0:666850d06c9f 170 #define __FPU_USED 0
jhon309 0:666850d06c9f 171 #endif
jhon309 0:666850d06c9f 172 #endif
jhon309 0:666850d06c9f 173
jhon309 0:666850d06c9f 174 #include <stdint.h> /*!< standard types definitions */
jhon309 0:666850d06c9f 175 #include "core_caInstr.h" /*!< Core Instruction Access */
jhon309 0:666850d06c9f 176 #include "core_caFunc.h" /*!< Core Function Access */
jhon309 0:666850d06c9f 177 #include "core_cm4_simd.h" /*!< Compiler specific SIMD Intrinsics */
jhon309 0:666850d06c9f 178
jhon309 0:666850d06c9f 179 #endif /* __CORE_CA9_H_GENERIC */
jhon309 0:666850d06c9f 180
jhon309 0:666850d06c9f 181 #ifndef __CMSIS_GENERIC
jhon309 0:666850d06c9f 182
jhon309 0:666850d06c9f 183 #ifndef __CORE_CA9_H_DEPENDANT
jhon309 0:666850d06c9f 184 #define __CORE_CA9_H_DEPENDANT
jhon309 0:666850d06c9f 185
jhon309 0:666850d06c9f 186 /* check device defines and use defaults */
jhon309 0:666850d06c9f 187 #if defined __CHECK_DEVICE_DEFINES
jhon309 0:666850d06c9f 188 #ifndef __CA9_REV
jhon309 0:666850d06c9f 189 #define __CA9_REV 0x0000
jhon309 0:666850d06c9f 190 #warning "__CA9_REV not defined in device header file; using default!"
jhon309 0:666850d06c9f 191 #endif
jhon309 0:666850d06c9f 192
jhon309 0:666850d06c9f 193 #ifndef __FPU_PRESENT
jhon309 0:666850d06c9f 194 #define __FPU_PRESENT 1
jhon309 0:666850d06c9f 195 #warning "__FPU_PRESENT not defined in device header file; using default!"
jhon309 0:666850d06c9f 196 #endif
jhon309 0:666850d06c9f 197
jhon309 0:666850d06c9f 198 #ifndef __Vendor_SysTickConfig
jhon309 0:666850d06c9f 199 #define __Vendor_SysTickConfig 1
jhon309 0:666850d06c9f 200 #endif
jhon309 0:666850d06c9f 201
jhon309 0:666850d06c9f 202 #if __Vendor_SysTickConfig == 0
jhon309 0:666850d06c9f 203 #error "__Vendor_SysTickConfig set to 0, but vendor systick timer must be supplied for Cortex-A9"
jhon309 0:666850d06c9f 204 #endif
jhon309 0:666850d06c9f 205 #endif
jhon309 0:666850d06c9f 206
jhon309 0:666850d06c9f 207 /* IO definitions (access restrictions to peripheral registers) */
jhon309 0:666850d06c9f 208 /**
jhon309 0:666850d06c9f 209 \defgroup CMSIS_glob_defs CMSIS Global Defines
jhon309 0:666850d06c9f 210
jhon309 0:666850d06c9f 211 <strong>IO Type Qualifiers</strong> are used
jhon309 0:666850d06c9f 212 \li to specify the access to peripheral variables.
jhon309 0:666850d06c9f 213 \li for automatic generation of peripheral register debug information.
jhon309 0:666850d06c9f 214 */
jhon309 0:666850d06c9f 215 #ifdef __cplusplus
jhon309 0:666850d06c9f 216 #define __I volatile /*!< Defines 'read only' permissions */
jhon309 0:666850d06c9f 217 #else
jhon309 0:666850d06c9f 218 #define __I volatile const /*!< Defines 'read only' permissions */
jhon309 0:666850d06c9f 219 #endif
jhon309 0:666850d06c9f 220 #define __O volatile /*!< Defines 'write only' permissions */
jhon309 0:666850d06c9f 221 #define __IO volatile /*!< Defines 'read / write' permissions */
jhon309 0:666850d06c9f 222
jhon309 0:666850d06c9f 223 /*@} end of group Cortex_A9 */
jhon309 0:666850d06c9f 224
jhon309 0:666850d06c9f 225
jhon309 0:666850d06c9f 226 /*******************************************************************************
jhon309 0:666850d06c9f 227 * Register Abstraction
jhon309 0:666850d06c9f 228 ******************************************************************************/
jhon309 0:666850d06c9f 229 /** \defgroup CMSIS_core_register Defines and Type Definitions
jhon309 0:666850d06c9f 230 \brief Type definitions and defines for Cortex-A processor based devices.
jhon309 0:666850d06c9f 231 */
jhon309 0:666850d06c9f 232
jhon309 0:666850d06c9f 233 /** \ingroup CMSIS_core_register
jhon309 0:666850d06c9f 234 \defgroup CMSIS_CORE Status and Control Registers
jhon309 0:666850d06c9f 235 \brief Core Register type definitions.
jhon309 0:666850d06c9f 236 @{
jhon309 0:666850d06c9f 237 */
jhon309 0:666850d06c9f 238
jhon309 0:666850d06c9f 239 /** \brief Union type to access the Application Program Status Register (APSR).
jhon309 0:666850d06c9f 240 */
jhon309 0:666850d06c9f 241 typedef union
jhon309 0:666850d06c9f 242 {
jhon309 0:666850d06c9f 243 struct
jhon309 0:666850d06c9f 244 {
jhon309 0:666850d06c9f 245 uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */
jhon309 0:666850d06c9f 246 uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */
jhon309 0:666850d06c9f 247 uint32_t reserved1:7; /*!< bit: 20..23 Reserved */
jhon309 0:666850d06c9f 248 uint32_t Q:1; /*!< bit: 27 Saturation condition flag */
jhon309 0:666850d06c9f 249 uint32_t V:1; /*!< bit: 28 Overflow condition code flag */
jhon309 0:666850d06c9f 250 uint32_t C:1; /*!< bit: 29 Carry condition code flag */
jhon309 0:666850d06c9f 251 uint32_t Z:1; /*!< bit: 30 Zero condition code flag */
jhon309 0:666850d06c9f 252 uint32_t N:1; /*!< bit: 31 Negative condition code flag */
jhon309 0:666850d06c9f 253 } b; /*!< Structure used for bit access */
jhon309 0:666850d06c9f 254 uint32_t w; /*!< Type used for word access */
jhon309 0:666850d06c9f 255 } APSR_Type;
jhon309 0:666850d06c9f 256
jhon309 0:666850d06c9f 257
jhon309 0:666850d06c9f 258 /*@} end of group CMSIS_CORE */
jhon309 0:666850d06c9f 259
jhon309 0:666850d06c9f 260 /*@} end of CMSIS_Core_FPUFunctions */
jhon309 0:666850d06c9f 261
jhon309 0:666850d06c9f 262
jhon309 0:666850d06c9f 263 #endif /* __CORE_CA9_H_GENERIC */
jhon309 0:666850d06c9f 264
jhon309 0:666850d06c9f 265 #endif /* __CMSIS_GENERIC */
jhon309 0:666850d06c9f 266
jhon309 0:666850d06c9f 267 #ifdef __cplusplus
jhon309 0:666850d06c9f 268 }
jhon309 0:666850d06c9f 269
jhon309 0:666850d06c9f 270
jhon309 0:666850d06c9f 271 #endif