-
Notifications
You must be signed in to change notification settings - Fork 24
/
config_options.h
executable file
·244 lines (201 loc) · 7.53 KB
/
config_options.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
/*! ----------------------------------------------------------------------------
* @file config_options.h
* @brief Configuration options are selected here.
*
* @attention
*
* Copyright 2019(c) Decawave Ltd, Dublin, Ireland.
*
* All rights reserved.
*
*/
#include <deca_device_api.h>
#ifndef EXAMPLES_CONFIG_OPTIONS_H_
#define EXAMPLES_CONFIG_OPTIONS_H_
/* Index values for errors in array */
#define CRC_ERR_IDX 0
#define RSE_ERR_IDX 1
#define PHE_ERR_IDX 2
#define SFDTO_ERR_IDX 3
#define PTO_ERR_IDX 4
#define RTO_ERR_IDX 5
#define SPICRC_ERR_IDX 6
#define TXTO_ERR_IDX 7
#define ARFE_ERR_IDX 8
#define TS_MISMATCH_ERR_IDX 9
#define BAD_FRAME_ERR_IDX 10
#define PREAMBLE_COUNT_ERR_IDX 11
#define CP_QUAL_ERR_IDX 12
#define STS_PREAMBLE_ERR 13
#define STS_PEAK_GROWTH_RATE_ERR 14
#define STS_ADC_COUNT_ERR 15
#define STS_SFD_COUNT_ERR 16
#define STS_LATE_FIRST_PATH_ERR 17
#define STS_LATE_COARSE_EST_ERR 18
#define STS_COARSE_EST_EMPTY_ERR 19
#define STS_HIGH_NOISE_THREASH_ERR 20
#define STS_NON_TRIANGLE_ERR 21
#define STS_LOG_REG_FAILED_ERR 22
/*
* Number of ranges to attempt in test
*/
#define RANGE_COUNT 200
/* Compensation value for CPU
* The time taken to receive the poll frame, check for errors,
* calculate length, read content, get poll timestamp,
* calculate response timestamp and send delayed response with timestamp will
* be different for each device.
* Adjusting this value lower and lower until dwt_starttx() starts returning
* DWT_ERROR status allows the user to tweak their system to calculate the
* shortest turn-around time for messages.
*/
#define CPU_COMP 400
/*
* SPI Rate Configuration Settings
*/
#define CONFIG_SPI_FAST_RATE
//#define CONFIG_SPI_SLOW_RATE
/*
* Changing threshold to 5ns for DW3000 B0 red board devices.
* ~10% of ranging attempts have a larger than usual difference between Ipatov and STS.
* A larger threshold allows for better coverage with this coverage.
* This should be fixed for DW3000 C0 devices.
*/
#define TS_MISMATCH_THRESHOLD 5*64 /* 64 = 1 ns --> 5 ns */
/*
* Please note that a PRF of 16 MHz and a STS PRF of 64 MHz will not be supported for the DW3000.
*/
/* Configuration option 01.
* Channel 5, PRF 64M, Preamble Length 64, PAC 8, Preamble code 9, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_01
/* Configuration option 02.
* Channel 9, PRF 64M, Preamble Length 64, PAC 8, Preamble code 9, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_02
/* Configuration option 03.
* Channel 5, PRF 64M, Preamble Length 128, PAC 8, Preamble code 9, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_03
/* Configuration option 04.
* Channel 9, PRF 64M, Preamble Length 128, PAC 8, Preamble code 9, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_04
/* Configuration option 05.
* Channel 5, PRF 64M, Preamble Length 512, PAC 8, Preamble code 9, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_05
/* Configuration option 06.
* Channel 9, PRF 64M, Preamble Length 512, PAC 8, Preamble code 9, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_06
/* Configuration option 07.
* Channel 5, PRF 64M, Preamble Length 1024, PAC 8, Preamble code 9, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_07
/* Configuration option 08.
* Channel 9, PRF 64M, Preamble Length 1024, PAC 8, Preamble code 9, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_08
/* Configuration option 09.
* Channel 5, PRF 64M, Preamble Length 64, PAC 8, Preamble code 10, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_09
/* Configuration option 10.
* Channel 9, PRF 64M, Preamble Length 64, PAC 8, Preamble code 10, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_10
/* Configuration option 11.
* Channel 5, PRF 64M, Preamble Length 128, PAC 8, Preamble code 10, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_11
/* Configuration option 12.
* Channel 9, PRF 64M, Preamble Length 128, PAC 8, Preamble code 10, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_12
/* Configuration option 13.
* Channel 5, PRF 64M, Preamble Length 512, PAC 8, Preamble code 10, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_13
/* Configuration option 14.
* Channel 9, PRF 64M, Preamble Length 512, PAC 8, Preamble code 10, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_14
/* Configuration option 15.
* Channel 5, PRF 64M, Preamble Length 1024, PAC 8, Preamble code 10, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_15
/* Configuration option 16.
* Channel 9, PRF 64M, Preamble Length 1024, PAC 8, Preamble code 10, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_16
/* Configuration option 17.
* Channel 5, PRF 64M, Preamble Length 64, PAC 8, Preamble code 9, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_17
/* Configuration option 18.
* Channel 9, PRF 64M, Preamble Length 64, PAC 8, Preamble code 9, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_18
/* Configuration option 19.
* Channel 5, PRF 64M, Preamble Length 128, PAC 8, Preamble code 9, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_19
/* Configuration option 20.
* Channel 9, PRF 64M, Preamble Length 128, PAC 8, Preamble code 9, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_20
/* Configuration option 21.
* Channel 5, PRF 64M, Preamble Length 512, PAC 8, Preamble code 9, Data Rate 850k, STS Length 64
*/
//#define CONFIG_OPTION_21
/* Configuration option 22.
* Channel 9, PRF 64M, Preamble Length 512, PAC 8, Preamble code 9, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_22
/* Configuration option 23.
* Channel 5, PRF 64M, Preamble Length 1024, PAC 8, Preamble code 9, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_23
/* Configuration option 24.
* Channel 9, PRF 64M, Preamble Length 1024, PAC 8, Preamble code 9, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_24
/* Configuration option 25.
* Channel 5, PRF 64M, Preamble Length 64, PAC 8, Preamble code 10, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_25
/* Configuration option 26.
* Channel 9, PRF 64M, Preamble Length 64, PAC 8, Preamble code 10, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_26
/* Configuration option 27.
* Channel 5, PRF 64M, Preamble Length 128, PAC 8, Preamble code 10, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_27
/* Configuration option 28.
* Channel 9, PRF 64M, Preamble Length 128, PAC 8, Preamble code 10, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_28
/* Configuration option 29.
* Channel 5, PRF 64M, Preamble Length 512, PAC 8, Preamble code 10, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_29
/* Configuration option 30.
* Channel 9, PRF 64M, Preamble Length 512, PAC 8, Preamble code 10, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_30
/* Configuration option 31.
* Channel 5, PRF 64M, Preamble Length 1024, PAC 8, Preamble code 10, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_31
/* Configuration option 32.
* Channel 9, PRF 64M, Preamble Length 1024, PAC 8, Preamble code 10, Data Rate 6.8M, STS Length 64
*/
//#define CONFIG_OPTION_32
/* Configuration option 33.
* Channel 5, PRF 64M, Preamble Length 128, PAC 8, Preamble code 9, Data Rate 6.8M, STS Length 128
*/
#define CONFIG_OPTION_33
extern char dist_str[16];
#endif /* EXAMPLES_CONFIG_OPTIONS_H_ */