Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 56 | mjames | 1 | /**************************************************************************//** |
| 2 | * @file system_ARMv8MBL.c |
||
| 3 | * @brief CMSIS Device System Source File for |
||
| 4 | * ARMv8MBL Device Series |
||
| 5 | * @version V5.00 |
||
| 6 | * @date 07. September 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 | #include "ARMv8MBL.h" |
||
| 27 | |||
| 28 | #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) |
||
| 29 | #include "partition_ARMv8MBL.h" |
||
| 30 | #endif |
||
| 31 | |||
| 32 | /*---------------------------------------------------------------------------- |
||
| 33 | Define clocks |
||
| 34 | *----------------------------------------------------------------------------*/ |
||
| 35 | #define XTAL ( 5000000UL) /* Oscillator frequency */ |
||
| 36 | |||
| 37 | #define SYSTEM_CLOCK (5U * XTAL) |
||
| 38 | |||
| 39 | |||
| 40 | /*---------------------------------------------------------------------------- |
||
| 41 | Externals |
||
| 42 | *----------------------------------------------------------------------------*/ |
||
| 43 | #if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) |
||
| 44 | extern uint32_t __Vectors; |
||
| 45 | #endif |
||
| 46 | |||
| 47 | /*---------------------------------------------------------------------------- |
||
| 48 | System Core Clock Variable |
||
| 49 | *----------------------------------------------------------------------------*/ |
||
| 50 | uint32_t SystemCoreClock = SYSTEM_CLOCK; |
||
| 51 | |||
| 52 | |||
| 53 | /*---------------------------------------------------------------------------- |
||
| 54 | System Core Clock update function |
||
| 55 | *----------------------------------------------------------------------------*/ |
||
| 56 | void SystemCoreClockUpdate (void) |
||
| 57 | { |
||
| 58 | SystemCoreClock = SYSTEM_CLOCK; |
||
| 59 | } |
||
| 60 | |||
| 61 | /*---------------------------------------------------------------------------- |
||
| 62 | System initialization function |
||
| 63 | *----------------------------------------------------------------------------*/ |
||
| 64 | void SystemInit (void) |
||
| 65 | { |
||
| 66 | |||
| 67 | #if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) |
||
| 68 | SCB->VTOR = (uint32_t) &__Vectors; |
||
| 69 | #endif |
||
| 70 | |||
| 71 | #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) |
||
| 72 | TZ_SAU_Setup(); |
||
| 73 | #endif |
||
| 74 | |||
| 75 | SystemCoreClock = SYSTEM_CLOCK; |
||
| 76 | } |