| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cpu_cfg.h
Go to the documentation of this file.
1 /*
2 *********************************************************************************************************
3 * uC/CPU
4 * CPU CONFIGURATION & PORT LAYER
5 *
6 * (c) Copyright 2004-2009; Micrium, Inc.; Weston, FL
7 *
8 * All rights reserved. Protected by international copyright laws.
9 *
10 * uC/CPU is provided in source form to registered licensees ONLY. It is
11 * illegal to distribute this source code to any third party unless you receive
12 * written permission by an authorized Micrium representative. Knowledge of
13 * the source code may NOT be used to develop a similar product.
14 *
15 * Please help us continue to provide the Embedded community with the finest
16 * software available. Your honesty is greatly appreciated.
17 *
18 * You can contact us at www.micrium.com.
19 *********************************************************************************************************
20 */
21
22 /*
23 *********************************************************************************************************
24 *
25 * CPU CONFIGURATION FILE
26 *
27 * TEMPLATE
28 *
29 * Filename : cpu_cfg.h
30 * Version : V1.25
31 * Programmer(s) : SR
32 * ITJ
33 *********************************************************************************************************
34 */
35
36
37 /*
38 *********************************************************************************************************
39 * MODULE
40 *********************************************************************************************************
41 */
42
43 #ifndef CPU_CFG_MODULE_PRESENT
44 #define CPU_CFG_MODULE_PRESENT
45
46
47 /*
48 *********************************************************************************************************
49 * CPU NAME CONFIGURATION
50 *
51 * Note(s) : (1) Configure CPU_CFG_NAME_EN to enable/disable CPU host name feature :
52 *
53 * (a) CPU host name storage
54 * (b) CPU host name API functions
55 *
56 * (2) Configure CPU_CFG_NAME_SIZE with the desired ASCII string size of the CPU host name,
57 * including the terminating NULL character.
58 *
59 * See also 'cpu_core.h GLOBAL VARIABLES Note #1'.
60 *********************************************************************************************************
61 */
62
63 /* Configure CPU host name feature (see Note #1) : */
64 #define CPU_CFG_NAME_EN DEF_DISABLED
65 /* DEF_DISABLED CPU host name DISABLED */
66 /* DEF_ENABLED CPU host name ENABLED */
67
68 /* Configure CPU host name ASCII string size ... */
69 #define CPU_CFG_NAME_SIZE 16u /* ... (see Note #2). */
70
71
72 /*$PAGE*/
73 /*
74 *********************************************************************************************************
75 * CPU TIMESTAMP CONFIGURATION
76 *
77 * Note(s) : (1) Configure CPU_CFG_TS_xx_EN to enable/disable CPU timestamp features :
78 *
79 * (a) CPU_CFG_TS_32_EN enable/disable 32-bit CPU timestamp feature
80 * (b) CPU_CFG_TS_64_EN enable/disable 64-bit CPU timestamp feature
81 *
82 * (2) (a) Configure CPU_CFG_TS_TMR_SIZE with the CPU timestamp timer's word size :
83 *
84 * CPU_WORD_SIZE_08 8-bit word size
85 * CPU_WORD_SIZE_16 16-bit word size
86 * CPU_WORD_SIZE_32 32-bit word size
87 * CPU_WORD_SIZE_64 64-bit word size
88 *
89 * (b) If the size of the CPU timestamp timer is not a binary multiple of 8-bit octets
90 * (e.g. 20-bits or even 24-bits), then the next lower, binary-multiple octet word
91 * size SHOULD be configured (e.g. to 16-bits). However, the minimum supported word
92 * size for CPU timestamp timers is 8-bits.
93 *
94 * See also 'cpu_core.h FUNCTION PROTOTYPES CPU_TS_TmrRd() Note #2a'.
95 *********************************************************************************************************
96 */
97
98 /* Configure CPU timestamp features (see Note #1) : */
99 #define CPU_CFG_TS_32_EN DEF_ENABLED
100 #define CPU_CFG_TS_64_EN DEF_DISABLED
101 /* DEF_DISABLED CPU timestamps DISABLED */
102 /* DEF_ENABLED CPU timestamps ENABLED */
103
104 /* Configure CPU timestamp timer word size ... */
105 /* ... (see Note #2) : */
106 #define CPU_CFG_TS_TMR_SIZE CPU_WORD_SIZE_32
107
108
109 /*
110 *********************************************************************************************************
111 * CPU INTERRUPTS DISABLED TIME MEASUREMENT CONFIGURATION
112 *
113 * Note(s) : (1) (a) Configure CPU_CFG_INT_DIS_MEAS_EN to enable/disable measuring CPU's interrupts
114 * disabled time :
115 *
116 * (a) Enabled, if CPU_CFG_INT_DIS_MEAS_EN #define'd in 'cpu_cfg.h'
117 *
118 * (b) Disabled, if CPU_CFG_INT_DIS_MEAS_EN NOT #define'd in 'cpu_cfg.h'
119 *
120 * See also 'cpu_core.h FUNCTION PROTOTYPES Note #1'
121 * & 'cpu_core.h CPU INCLUDE FILES Note #3'.
122 *
123 * (b) Configure CPU_CFG_INT_DIS_MEAS_OVRHD_NBR with the number of times to measure &
124 * average the interrupts disabled time measurements overhead.
125 *
126 * Recommend a single (1) overhead time measurement, even for instruction-cache-enabled
127 * CPUs, since critical sections are NOT typically called within instruction-cached loops.
128 * Thus, a single non-cached/non-averaged time measurement is a more realistic overhead
129 * for the majority of non-cached interrupts disabled time measurements.
130 *
131 * See also 'cpu_core.c CPU_IntDisMeasInit() Note #3a'.
132 *********************************************************************************************************
133 */
134
135 #if 1 /* Configure CPU interrupts disabled time ... */
136 #define CPU_CFG_INT_DIS_MEAS_EN /* ... measurements feature (see Note #1a). */
137 #endif
138
139 /* Configure number of interrupts disabled overhead ... */
140 #define CPU_CFG_INT_DIS_MEAS_OVRHD_NBR 1u /* ... time measurements (see Note #1b). */
141
142
143 /*$PAGE*/
144 /*
145 *********************************************************************************************************
146 * CPU COUNT LEADING ZEROS CONFIGURATION
147 *
148 * Note(s) : (1) Configure CPU_CFG_LEAD_ZEROS_ASM_PRESENT to prototype/define count leading zeros bits
149 * function(s) in :
150 *
151 * (a) 'cpu.h'/'cpu_a.asm', if CPU_CFG_LEAD_ZEROS_ASM_PRESENT #define'd in 'cpu.h'/
152 * 'cpu_cfg.h' to enable assembly-version function(s)
153 *
154 * (b) 'cpu_core.h'/'cpu_core.c', if CPU_CFG_LEAD_ZEROS_ASM_PRESENT NOT #define'd in 'cpu.h'/
155 * 'cpu_cfg.h' to enable C-source-version function(s) otherwise
156 *
157 * See also 'cpu_core.h FUNCTION PROTOTYPES Note #2'
158 * & 'cpu_core.h CPU INCLUDE FILES Note #3'.
159 *********************************************************************************************************
160 */
161
162 #if 1 /* Configure CPU count leading zeros bits ... */
163 #define CPU_CFG_LEAD_ZEROS_ASM_PRESENT /* ... assembly-version (see Note #1). */
164 #endif
165
166
167 /*$PAGE*/
168 /*
169 *********************************************************************************************************
170 * MODULE END
171 *********************************************************************************************************
172 */
173
174 #endif /* End of CPU cfg module include. */
175