• 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> The Number of sectors for NVDS
146 // <i> Default:  1
147 #ifndef NVDS_NUM_SECTOR
148 #define NVDS_NUM_SECTOR         1
149 #endif
150 
151 // <o> Call Stack Size
152 // <i> Default: 0x4000
153 #ifndef CSTACK_HEAP_SIZE
154 #define CSTACK_HEAP_SIZE        0x4000
155 #endif
156 
157 // <o> Enable callstack backtrace function
158 // <i> Default: 0
159 #ifndef ENABLE_BACKTRACE_FEA
160 #define ENABLE_BACKTRACE_FEA    0
161 #endif
162 
163 // </h>
164 
165 // <h> Boot info configuration
166 
167 // <o> Code load address
168 // <i> Default:  0x01002000
169 #define APP_CODE_LOAD_ADDR      0x0100b000
170 
171 // <o> Code run address
172 // <i> Default:  0x01002000
173 #define APP_CODE_RUN_ADDR       0x0100b000
174 
175 // <ol.0..5> System clock
176 // <0=> 64MHZ
177 // <1=> 48MHZ
178 // <2=> 16MHZ-XO
179 // <3=> 24MHZ
180 // <4=> 16MHZ
181 // <5=> 32MHZ-CPLL
182 #define SYSTEM_CLOCK            0
183 
184 // <o> External clock accuracy used in the LL to compute timing  <1-500>
185 // <i> Range: 1-500
186 #define CFG_LF_ACCURACY_PPM     500
187 
188 // <o> Enable internal osc as low power clock
189 // <0=> Default: Disable internal osc as low power clock
190 // <1=> Enable internal osc as low power clock and force CFG_LF_ACCURACY_PPM to 500ppm
191 #define CFG_LPCLK_INTERNAL_EN   0
192 
193 // <o> Delay time for Boot startup
194 // <0=> Not Delay
195 // <1=> Delay 1s
196 #define BOOT_LONG_TIME          1
197 
198 // <o> In xip mode, check image during cold boot startup
199 // <0=> Not check
200 // <1=> Check image
201 #define BOOT_CHECK_IMAGE        1
202 
203 // <o> Code version.16bits
204 #define VERSION                 1
205 
206 // <o> Delay time between flash wakeup and read chip id in warm boot
207 // <i> Default:  0
208 // <i> Range: 0-10
209 // <i> Note:
210 // <0=> No delay
211 // <1=> Delay 5 us
212 // <2=> Delay 10 us
213 // <3=> Delay 15 us
214 // <4=> Delay 20 us
215 // <5=> Delay 25 us
216 #ifndef EXFLASH_WAKEUP_DELAY
217 #define EXFLASH_WAKEUP_DELAY              0
218 #endif
219 // </h>
220 
221 // <h> BLE resource configuration
222 // <i> Note: The total number of BLE Activities(CONNECTIONS+ADVS+2*PER_ADVS+SYNCS+SCAN) should not exceed the limit 12.
223 
224 // <o> Support maximum number of BLE profiles <0-64>
225 // <i> Range: 0-64
226 #ifndef CFG_MAX_PRFS
227 #define CFG_MAX_PRFS            10
228 #endif
229 
230 // <o> Support maximum number of bonded devices <0-10>
231 // <i> Range: 0-10
232 #ifndef CFG_MAX_BOND_DEVS
233 #define CFG_MAX_BOND_DEVS       4
234 #endif
235 
236 // <o> Support maximum number of BLE Links <0-10>
237 // <i> Range: 0-10
238 #ifndef CFG_MAX_CONNECTIONS
239 #define CFG_MAX_CONNECTIONS     10
240 #endif
241 
242 // <o> Support maximum number of BLE Legacy/Extended Advertisings <0-5>
243 // <i> Range: 0-5
244 // <i> Note: The total number of BLE Legacy/Extended/Periodic Advertisings should not exceed the limit 5.
245 #ifndef CFG_MAX_ADVS
246 #define CFG_MAX_ADVS            1
247 #endif
248 
249 // <o> Support maximum number of BLE Periodic Advertisings <0-5>
250 // <i> Range: 0-5
251 // <i> Note: The total number of BLE Legacy/Extended/Periodic Advertisings should not exceed the limit 5.
252 #ifndef CFG_MAX_PER_ADVS
253 #define CFG_MAX_PER_ADVS        0
254 #endif
255 
256 // <o> Support maximum number of BLE Periodic Advertising Synchronizations <0-5>
257 // <i> Range: 0-5
258 #ifndef CFG_MAX_SYNCS
259 #define CFG_MAX_SYNCS           0
260 #endif
261 
262 // <o> Support maximum number of BLE Scan <0-1>
263 // <i> Range: 0-1
264 #ifndef CFG_MAX_SCAN
265 #define CFG_MAX_SCAN            1
266 #endif
267 // </h>
268 
269 // <h> MESH support configuration
270 // <o> MESH support
271 // <0=> NOT SUPPORT
272 // <1=> SUPPORT
273 #ifndef CFG_MESH_SUPPORT
274 #define CFG_MESH_SUPPORT        0
275 #endif
276 // </h>
277 
278 // <h> LCP support configuration
279 // <o> LCP support
280 // <0=> NOT SUPPORT
281 // <1=> SUPPORT
282 #ifndef CFG_LCP_SUPPORT
283 #define CFG_LCP_SUPPORT         0
284 #endif
285 // </h>
286 
287 // <<< end of configuration section >>>
288 #endif // __CUSTOM_CONFIG_H__
289