]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/system/Keil/system_MSP432P4.c
Final V8.2.1 release ready for tagging:
[freertos] / FreeRTOS / Demo / CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil / system / Keil / system_MSP432P4.c
1 //*****************************************************************************\r
2 //\r
3 // Copyright (C) 2012 - 2014 Texas Instruments Incorporated - http://www.ti.com/ \r
4 //\r
5 // Redistribution and use in source and binary forms, with or without \r
6 // modification, are permitted provided that the following conditions \r
7 // are met:\r
8 //\r
9 //  Redistributions of source code must retain the above copyright \r
10 //  notice, this list of conditions and the following disclaimer.\r
11 //\r
12 //  Redistributions in binary form must reproduce the above copyright\r
13 //  notice, this list of conditions and the following disclaimer in the \r
14 //  documentation and/or other materials provided with the   \r
15 //  distribution.\r
16 //\r
17 //  Neither the name of Texas Instruments Incorporated nor the names of\r
18 //  its contributors may be used to endorse or promote products derived\r
19 //  from this software without specific prior written permission.\r
20 //\r
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
32 //\r
33 // MSP432 Startup File\r
34 //\r
35 // File creation date: 2014-07-08\r
36 //\r
37 //*****************************************************************************\r
38 \r
39 #include <stdint.h>\r
40 #include "msp432.h"\r
41 \r
42 /*----------------------------------------------------------------------------\r
43   Define clocks\r
44  *----------------------------------------------------------------------------*/\r
45 #define __SYSTEM_CLOCK    (2000000)\r
46 \r
47 /*----------------------------------------------------------------------------\r
48   Clock Variable definitions\r
49  *----------------------------------------------------------------------------*/\r
50 uint32_t SystemCoreClock = __SYSTEM_CLOCK;  /*!< System Clock Frequency (Core Clock)*/\r
51 \r
52 \r
53 /*----------------------------------------------------------------------------\r
54   Clock functions\r
55  *----------------------------------------------------------------------------*/\r
56 void SystemCoreClockUpdate (void)            /* Get Core Clock Frequency      */\r
57 {\r
58   SystemCoreClock = __SYSTEM_CLOCK;\r
59 }\r
60 \r
61 /*----------------------------------------------------------------------------\r
62   Initialize the system\r
63  *----------------------------------------------------------------------------*/\r
64 void SystemInit (void)\r
65 {\r
66   SystemCoreClock = __SYSTEM_CLOCK;\r
67         WDT_A->rCTL.r = WDTPW + WDTHOLD;\r
68 }\r