Subversion Repositories testOled

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 mjames 1
/**************************************************************************//**
2
 * @file     system_ARMCM23.c
3
 * @brief    CMSIS Device System Source File for
4
 *           ARMCM23 Device Series
5
 * @version  V5.00
6
 * @date     21. October 2016
7
 ******************************************************************************/
8
/*
9
 * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
10
 *
11
 * SPDX-License-Identifier: Apache-2.0
12
 *
13
 * Licensed under the Apache License, Version 2.0 (the License); you may
14
 * not use this file except in compliance with the License.
15
 * You may obtain a copy of the License at
16
 *
17
 * http://www.apache.org/licenses/LICENSE-2.0
18
 *
19
 * Unless required by applicable law or agreed to in writing, software
20
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
21
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
 * See the License for the specific language governing permissions and
23
 * limitations under the License.
24
 */
25
 
26
#if defined (ARMCM23)
27
  #include "ARMCM23.h"
28
#elif defined (ARMCM23_TZ)
29
  #include "ARMCM23_TZ.h"
30
 
31
  #if defined (__ARM_FEATURE_CMSE) &&  (__ARM_FEATURE_CMSE == 3U)
32
    #include "partition_ARMCM23.h"
33
  #endif
34
#else
35
  #error device not specified!
36
#endif
37
 
38
/*----------------------------------------------------------------------------
39
  Define clocks
40
 *----------------------------------------------------------------------------*/
41
#define  XTAL            ( 5000000UL)      /* Oscillator frequency */
42
 
43
#define  SYSTEM_CLOCK    (5U * XTAL)
44
 
45
 
46
/*----------------------------------------------------------------------------
47
  Externals
48
 *----------------------------------------------------------------------------*/
49
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
50
  extern uint32_t __Vectors;
51
#endif
52
 
53
/*----------------------------------------------------------------------------
54
  System Core Clock Variable
55
 *----------------------------------------------------------------------------*/
56
uint32_t SystemCoreClock = SYSTEM_CLOCK;
57
 
58
 
59
/*----------------------------------------------------------------------------
60
  System Core Clock update function
61
 *----------------------------------------------------------------------------*/
62
void SystemCoreClockUpdate (void)
63
{
64
  SystemCoreClock = SYSTEM_CLOCK;
65
}
66
 
67
/*----------------------------------------------------------------------------
68
  System initialization function
69
 *----------------------------------------------------------------------------*/
70
void SystemInit (void)
71
{
72
 
73
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
74
  SCB->VTOR = (uint32_t) &__Vectors;
75
#endif
76
 
77
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
78
  TZ_SAU_Setup();
79
#endif
80
 
81
  SystemCoreClock = SYSTEM_CLOCK;
82
}