• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  ****************************************************************************************
3  *
4  * @file custom_config.h
5  *
6  * @brief Custom configuration file for applications.
7  *
8  ****************************************************************************************
9  * @attention
10   #####Copyright (c) 2019 GOODIX
11   All rights reserved.
12 
13     Redistribution and use in source and binary forms, with or without
14     modification, are permitted provided that the following conditions are met:
15   * Redistributions of source code must retain the above copyright
16     notice, this list of conditions and the following disclaimer.
17   * Redistributions in binary form must reproduce the above copyright
18     notice, this list of conditions and the following disclaimer in the
19     documentation and/or other materials provided with the distribution.
20   * Neither the name of GOODIX nor the names of its contributors may be used
21     to endorse or promote products derived from this software without
22     specific prior written permission.
23 
24   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34   POSSIBILITY OF SUCH DAMAGE.
35  *****************************************************************************************
36  */
37 
38 /*
39  * DEFINES
40  *****************************************************************************************
41  */
42 #ifndef __CUSTOM_CONFIG_H__
43 #define __CUSTOM_CONFIG_H__
44 
45 // <<< Use Configuration Wizard in Context Menu >>>
46 
47 // <h> Basic configuration
48 
49 // <o> Chip version
50 #define GR5515_D
51 
52 // <o> Select chip type
53 // <0=> GR5515
54 // <1=> GR5513
55 #ifndef CHIP_TYPE
56 #define CHIP_TYPE  0
57 #endif
58 
59 // <o> Enable encrypt chip
60 // <0=> DISABLE
61 // <1=> ENABLE
62 #ifndef ENCRYPT_ENABLE
63 #define ENCRYPT_ENABLE  1
64 #endif
65 
66 // <o> Enable the external flash of chip
67 // <0=> DISABLE
68 // <1=> ENABLE
69 #ifndef EXT_EXFLASH_ENABLE
70 #define EXT_EXFLASH_ENABLE      0
71 #endif
72 
73 // <o> Enable system fault trace module
74 // <0=> DISABLE
75 // <1=> ENABLE
76 #ifndef SYS_FAULT_TRACE_ENABLE
77 #define SYS_FAULT_TRACE_ENABLE  1
78 #endif
79 
80 // <o> Enable APP driver module
81 // <0=> DISABLE
82 // <1=> ENABLE
83 #ifndef APP_DRIVER_USE_ENABLE
84 #define APP_DRIVER_USE_ENABLE   1
85 #endif
86 
87 // <o> Eanble APP log module
88 // <0=> DISABLE
89 // <1=> ENABLE
90 #ifndef APP_LOG_ENABLE
91 #define APP_LOG_ENABLE          1
92 #endif
93 
94 // <o> APP log port type
95 // <0=> UART
96 // <1=> RTT
97 // <2=> ITM
98 #ifndef APP_LOG_PORT
99 #define APP_LOG_PORT            0
100 #endif
101 
102 // <o> Eanble APP log store module
103 // <0=> DISABLE
104 // <1=> ENABLE
105 #ifndef APP_LOG_STORE_ENABLE
106 #define APP_LOG_STORE_ENABLE    0
107 #endif
108 
109 #if     (CHIP_TYPE == 0)
110 // <o> Enable SK GUI module, only available in GR5515
111 // <0=> DISABLE
112 // <1=> ENABLE
113 #ifndef SK_GUI_ENABLE
114 #define SK_GUI_ENABLE           1
115 #endif
116 #endif
117 
118 // <o> Enable debug monitor module
119 // <0=> DISABLE
120 // <1=> ENABLE
121 #ifndef DEBUG_MONITOR
122 #define DEBUG_MONITOR           0
123 #endif
124 
125 // <o> Enable DTM test support
126 // <0=> DISABLE
127 // <1=> ENABLE
128 #ifndef DTM_TEST_ENABLE
129 #define DTM_TEST_ENABLE         0
130 #endif
131 
132 // <o> Enable BLE DFU support
133 // <0=> DISABLE
134 // <1=> ENABLE
135 #ifndef DFU_ENABLE
136 #define DFU_ENABLE              1
137 #endif
138 
139 // <o> Protection priority level
140 // <i> Default:  0
141 #ifndef FLASH_PROTECT_PRIORITY
142 #define FLASH_PROTECT_PRIORITY  0
143 #endif
144 
145 // <o> NVDS Start Address
146 // <i> Default:  0x010FF000
147 #ifndef NVDS_START_ADDR
148 #define NVDS_START_ADDR         0x010FF000
149 #endif
150 
151 // <o> The Number of sectors for NVDS
152 // <i> Default:  1
153 #ifndef NVDS_NUM_SECTOR
154 #define NVDS_NUM_SECTOR         1
155 #endif
156 
157 // <o> Call Stack Size
158 // <i> Default: 0x4000
159 #ifndef CSTACK_HEAP_SIZE
160 #define CSTACK_HEAP_SIZE        0x4000
161 #endif
162 
163 // <o> Enable callstack backtrace function
164 // <i> Default: 0
165 #ifndef ENABLE_BACKTRACE_FEA
166 #define ENABLE_BACKTRACE_FEA    0
167 #endif
168 
169 // </h>
170 
171 // <h> Boot info configuration
172 
173 // <o> Code load address
174 // <i> Default:  0x01002000
175 #define APP_CODE_LOAD_ADDR      0x0100b000
176 
177 // <o> Code run address
178 // <i> Default:  0x01002000
179 #define APP_CODE_RUN_ADDR       0x0100b000
180 
181 // <ol.0..5> System clock
182 // <0=> 64MHZ
183 // <1=> 48MHZ
184 // <2=> 16MHZ-XO
185 // <3=> 24MHZ
186 // <4=> 16MHZ
187 // <5=> 32MHZ-CPLL
188 #define SYSTEM_CLOCK            0
189 
190 // <o> External clock accuracy used in the LL to compute timing  <1-500>
191 // <i> Range: 1-500
192 #define CFG_LF_ACCURACY_PPM     500
193 
194 // <o> Enable internal osc as low power clock
195 // <0=> Default: Disable internal osc as low power clock
196 // <1=> Enable internal osc as low power clock and force CFG_LF_ACCURACY_PPM to 500ppm
197 #define CFG_LPCLK_INTERNAL_EN   0
198 
199 // <o> Delay time for Boot startup
200 // <0=> Not Delay
201 // <1=> Delay 1s
202 #define BOOT_LONG_TIME          1
203 
204 // <o> In xip mode, check image during cold boot startup
205 // <0=> Not check
206 // <1=> Check image
207 #define BOOT_CHECK_IMAGE        1
208 
209 // <o> Code version.16bits
210 #define VERSION                 1
211 
212 // <o> Delay time between flash wakeup and read chip id in warm boot
213 // <i> Default:  0
214 // <i> Range: 0-10
215 // <i> Note:
216 // <0=> No delay
217 // <1=> Delay 5 us
218 // <2=> Delay 10 us
219 // <3=> Delay 15 us
220 // <4=> Delay 20 us
221 // <5=> Delay 25 us
222 #ifndef EXFLASH_WAKEUP_DELAY
223 #define EXFLASH_WAKEUP_DELAY              0
224 #endif
225 // </h>
226 
227 // <h> BLE resource configuration
228 // <i> Note: The total number of BLE Activities(CONNECTIONS+ADVS+2*PER_ADVS+SYNCS+SCAN) should not exceed the limit 12.
229 
230 // <o> Support maximum number of BLE profiles <0-64>
231 // <i> Range: 0-64
232 #ifndef CFG_MAX_PRFS
233 #define CFG_MAX_PRFS            10
234 #endif
235 
236 // <o> Support maximum number of bonded devices <0-10>
237 // <i> Range: 0-10
238 #ifndef CFG_MAX_BOND_DEVS
239 #define CFG_MAX_BOND_DEVS       4
240 #endif
241 
242 // <o> Support maximum number of BLE Links <0-10>
243 // <i> Range: 0-10
244 #ifndef CFG_MAX_CONNECTIONS
245 #define CFG_MAX_CONNECTIONS     10
246 #endif
247 
248 // <o> Support maximum number of BLE Legacy/Extended Advertisings <0-5>
249 // <i> Range: 0-5
250 // <i> Note: The total number of BLE Legacy/Extended/Periodic Advertisings should not exceed the limit 5.
251 #ifndef CFG_MAX_ADVS
252 #define CFG_MAX_ADVS            1
253 #endif
254 
255 // <o> Support maximum number of BLE Periodic Advertisings <0-5>
256 // <i> Range: 0-5
257 // <i> Note: The total number of BLE Legacy/Extended/Periodic Advertisings should not exceed the limit 5.
258 #ifndef CFG_MAX_PER_ADVS
259 #define CFG_MAX_PER_ADVS        0
260 #endif
261 
262 // <o> Support maximum number of BLE Periodic Advertising Synchronizations <0-5>
263 // <i> Range: 0-5
264 #ifndef CFG_MAX_SYNCS
265 #define CFG_MAX_SYNCS           0
266 #endif
267 
268 // <o> Support maximum number of BLE Scan <0-1>
269 // <i> Range: 0-1
270 #ifndef CFG_MAX_SCAN
271 #define CFG_MAX_SCAN            1
272 #endif
273 // </h>
274 
275 // <h> MESH support configuration
276 // <o> MESH support
277 // <0=> NOT SUPPORT
278 // <1=> SUPPORT
279 #ifndef CFG_MESH_SUPPORT
280 #define CFG_MESH_SUPPORT        0
281 #endif
282 // </h>
283 
284 // <h> LCP support configuration
285 // <o> LCP support
286 // <0=> NOT SUPPORT
287 // <1=> SUPPORT
288 #ifndef CFG_LCP_SUPPORT
289 #define CFG_LCP_SUPPORT         0
290 #endif
291 // </h>
292 
293 // <<< end of configuration section >>>
294 #endif // __CUSTOM_CONFIG_H__
295