1 /**************************************************************************//**
\r
2 * @file system_ARMCM33.c
\r
3 * @brief CMSIS Device System Source File for
\r
4 * ARMCM33 Device Series
\r
6 * @date 02. November 2016
\r
7 ******************************************************************************/
\r
9 * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
\r
11 * SPDX-License-Identifier: Apache-2.0
\r
13 * Licensed under the Apache License, Version 2.0 (the License); you may
\r
14 * not use this file except in compliance with the License.
\r
15 * You may obtain a copy of the License at
\r
17 * www.apache.org/licenses/LICENSE-2.0
\r
19 * Unless required by applicable law or agreed to in writing, software
\r
20 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
\r
21 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
22 * See the License for the specific language governing permissions and
\r
23 * limitations under the License.
\r
26 #if defined (ARMCM33)
\r
27 #include "ARMCM33.h"
\r
28 #elif defined (ARMCM33_TZ)
\r
29 #include "ARMCM33_TZ.h"
\r
31 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
\r
32 #include "partition_ARMCM33.h"
\r
34 #elif defined (ARMCM33_DSP_FP)
\r
35 #include "ARMCM33_DSP_FP.h"
\r
36 #elif defined (ARMCM33_DSP_FP_TZ)
\r
37 #include "ARMCM33_DSP_FP_TZ.h"
\r
39 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
\r
40 #include "partition_ARMCM33.h"
\r
43 #error device not specified!
\r
46 /*----------------------------------------------------------------------------
\r
48 *----------------------------------------------------------------------------*/
\r
49 #define XTAL ( 5000000UL) /* Oscillator frequency */
\r
51 #define SYSTEM_CLOCK (5U * XTAL)
\r
54 /*----------------------------------------------------------------------------
\r
56 *----------------------------------------------------------------------------*/
\r
57 #if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
\r
58 extern uint32_t __Vectors;
\r
61 /*----------------------------------------------------------------------------
\r
62 System Core Clock Variable
\r
63 *----------------------------------------------------------------------------*/
\r
64 uint32_t SystemCoreClock = SYSTEM_CLOCK;
\r
67 /*----------------------------------------------------------------------------
\r
68 System Core Clock update function
\r
69 *----------------------------------------------------------------------------*/
\r
70 void SystemCoreClockUpdate (void)
\r
72 SystemCoreClock = SYSTEM_CLOCK;
\r
75 /*----------------------------------------------------------------------------
\r
76 System initialization function
\r
77 *----------------------------------------------------------------------------*/
\r
78 void SystemInit (void)
\r
81 #if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
\r
82 SCB->VTOR = (uint32_t) &__Vectors;
\r
85 #if defined (__FPU_USED) && (__FPU_USED == 1U)
\r
86 SCB->CPACR |= ((3U << 10U*2U) | /* set CP10 Full Access */
\r
87 (3U << 11U*2U) ); /* set CP11 Full Access */
\r
90 #ifdef UNALIGNED_SUPPORT_DISABLE
\r
91 SCB->CCR |= SCB_CCR_UNALIGN_TRP_Msk;
\r
94 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
\r
98 SystemCoreClock = SYSTEM_CLOCK;
\r