cursada_mc2
Base de control de temperatura para EDU-CIAA-NXP
Loading...
Searching...
No Matches
sysinit.c
Go to the documentation of this file.
1
/*
2
* @brief Common SystemInit function for LPC18xx/LPC43xx chips
3
*
4
* @note
5
* Copyright 2013-2014, 2019, 2020 NXP
6
* All rights reserved.
7
*
8
* @par
9
* NXP Confidential. This software is owned or controlled by NXP and may only be
10
* used strictly in accordance with the applicable license terms.
11
*
12
* By expressly accepting such terms or by downloading, installing, activating
13
* and/or otherwise using the software, you are agreeing that you have read, and
14
* that you agree to comply with and are bound by, such license terms.
15
*
16
* If you do not agree to be bound by the applicable license terms, then you may not
17
* retain, install, activate or otherwise use the software.
18
*/
19
20
#if defined(NO_BOARD_LIB)
21
#include "chip.h"
22
#else
23
#include "board.h"
24
#endif
25
26
/*****************************************************************************
27
* Private types/enumerations/variables
28
****************************************************************************/
29
30
/*****************************************************************************
31
* Public types/enumerations/variables
32
****************************************************************************/
33
34
#if defined(NO_BOARD_LIB)
35
const
uint32_t ExtRateIn = 0;
36
const
uint32_t OscRateIn = 12000000;
37
#endif
38
39
/*****************************************************************************
40
* Private functions
41
****************************************************************************/
42
43
/*****************************************************************************
44
* Public functions
45
****************************************************************************/
46
47
/* Set up and initialize hardware prior to call to main */
48
void
SystemInit
(
void
)
49
{
50
#if defined(CORE_M3) || defined(CORE_M4)
51
unsigned
int
*pSCB_VTOR = (
unsigned
int
*) 0xE000ED08;
52
53
#if defined(__IAR_SYSTEMS_ICC__)
54
extern
void
*__vector_table;
55
56
*pSCB_VTOR = (
unsigned
int) &__vector_table;
57
#elif defined(__CODE_RED)
58
extern
void
*g_pfnVectors;
59
60
*pSCB_VTOR = (
unsigned
int) &g_pfnVectors;
61
#elif defined(__ARMCC_VERSION)
62
extern
void
*__Vectors;
63
64
*pSCB_VTOR = (
unsigned
int) &__Vectors;
65
#else
66
extern
void
*g_pfnVectors;
67
68
*pSCB_VTOR = (
unsigned
int) &g_pfnVectors;
69
#endif
70
71
#if defined(__FPU_PRESENT) && __FPU_PRESENT == 1
72
fpuInit();
73
#endif
74
75
#if defined(NO_BOARD_LIB)
76
/* Chip specific SystemInit */
77
Chip_SystemInit();
78
#else
79
/* Board specific SystemInit */
80
Board_SystemInit();
81
#endif
82
83
#endif
/* defined(CORE_M3) || defined(CORE_M4) */
84
}
SystemInit
void SystemInit(void)
Definition
sysinit.c:48
src
startup
sysinit.c
Generated by
1.9.8