mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
targets/TARGET_ONSEMI/TARGET_NCS36510/device/system_NCS36510.c@153:9398a535854b, 2016-12-22 (annotated)
- Committer:
- fwndz
- Date:
- Thu Dec 22 05:12:40 2016 +0000
- Revision:
- 153:9398a535854b
- Parent:
- 150:02e0a0aed4ec
device target maximize
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 149:156823d33999 | 1 | /**************************************************************************//** |
<> | 149:156823d33999 | 2 | * @file system_NCS36510.c |
<> | 149:156823d33999 | 3 | * @brief CMSIS Cortex-M3 Device System Source File |
<> | 149:156823d33999 | 4 | * for CM3 Device Series |
<> | 149:156823d33999 | 5 | * @version V1.05 |
<> | 149:156823d33999 | 6 | * @date 26. July 2011 |
<> | 149:156823d33999 | 7 | * |
<> | 149:156823d33999 | 8 | * @note |
<> | 149:156823d33999 | 9 | * Copyright (C) 2010-2011 ARM Limited. All rights reserved. |
<> | 149:156823d33999 | 10 | * |
<> | 149:156823d33999 | 11 | * @par |
<> | 149:156823d33999 | 12 | * ARM Limited (ARM) is supplying this software for use with Cortex-M |
<> | 149:156823d33999 | 13 | * processor based microcontrollers. This file can be freely distributed |
<> | 149:156823d33999 | 14 | * within development tools that are supporting such ARM based processors. |
<> | 149:156823d33999 | 15 | * |
<> | 149:156823d33999 | 16 | * @par |
<> | 149:156823d33999 | 17 | * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED |
<> | 149:156823d33999 | 18 | * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF |
<> | 149:156823d33999 | 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. |
<> | 149:156823d33999 | 20 | * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR |
<> | 149:156823d33999 | 21 | * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
<> | 149:156823d33999 | 22 | * |
<> | 149:156823d33999 | 23 | ******************************************************************************/ |
<> | 149:156823d33999 | 24 | |
<> | 149:156823d33999 | 25 | #include <NCS36510.h> |
<> | 150:02e0a0aed4ec | 26 | #include "ncs36510Init.h" |
<> | 149:156823d33999 | 27 | /*---------------------------------------------------------------------------- |
<> | 149:156823d33999 | 28 | Define clocks |
<> | 149:156823d33999 | 29 | *----------------------------------------------------------------------------*/ |
<> | 149:156823d33999 | 30 | #define __HSI ( 8000000UL) |
<> | 149:156823d33999 | 31 | #define __XTAL (32769000UL) /* Oscillator frequency */ |
<> | 149:156823d33999 | 32 | |
<> | 149:156823d33999 | 33 | /** Value initialized here*/ |
<> | 149:156823d33999 | 34 | #define __SYSTEM_CLOCK (32000000) |
<> | 149:156823d33999 | 35 | |
<> | 149:156823d33999 | 36 | |
<> | 149:156823d33999 | 37 | /*---------------------------------------------------------------------------- |
<> | 149:156823d33999 | 38 | Clock Variable definitions |
<> | 149:156823d33999 | 39 | *----------------------------------------------------------------------------*/ |
<> | 149:156823d33999 | 40 | uint32_t SystemCoreClock = __SYSTEM_CLOCK;/*!< System Clock Frequency (Core Clock)*/ |
<> | 149:156823d33999 | 41 | |
<> | 149:156823d33999 | 42 | |
<> | 149:156823d33999 | 43 | /*---------------------------------------------------------------------------- |
<> | 149:156823d33999 | 44 | Clock functions |
<> | 149:156823d33999 | 45 | *----------------------------------------------------------------------------*/ |
<> | 149:156823d33999 | 46 | void SystemCoreClockUpdate (void) /* Get Core Clock Frequency */ |
<> | 149:156823d33999 | 47 | { |
<> | 149:156823d33999 | 48 | /*Function not implimented */ |
<> | 149:156823d33999 | 49 | SystemCoreClock = __SYSTEM_CLOCK; |
<> | 149:156823d33999 | 50 | } |
<> | 149:156823d33999 | 51 | |
<> | 149:156823d33999 | 52 | /** |
<> | 149:156823d33999 | 53 | * Initialize the system |
<> | 149:156823d33999 | 54 | * |
<> | 149:156823d33999 | 55 | * @param none |
<> | 149:156823d33999 | 56 | * @return none |
<> | 149:156823d33999 | 57 | * |
<> | 149:156823d33999 | 58 | * @brief Setup the microcontroller system. |
<> | 149:156823d33999 | 59 | * Initialize the System. |
<> | 149:156823d33999 | 60 | */ |
<> | 149:156823d33999 | 61 | void SystemInit (void) |
<> | 149:156823d33999 | 62 | { |
<> | 149:156823d33999 | 63 | |
<> | 149:156823d33999 | 64 | SystemCoreClock = __SYSTEM_CLOCK; |
<> | 149:156823d33999 | 65 | |
<> | 149:156823d33999 | 66 | fNcs36510Init(); |
<> | 149:156823d33999 | 67 | } |