Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Sep 02 14:17:43 2015 +0100
Revision:
106:ba1f97679dad
Child:
115:87f2f5183dfb
Release 106  of the mbed library

Changes:
- new platform - Nucleo F446RE
- STM32F4 Cube driver update v2.3.2
- ST cmsis driver v2.3.2
- nordic bugfix gcc linker start address
- lpc11u68 - bugfix for serial ports

Who changed what in which revision?

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