1 /*
2 * Copyright (c) 2017, STMicroelectronics - All Rights Reserved
3 *
4 * This file is part of VL53L1 Core and is dual licensed,
5 * either 'STMicroelectronics
6 * Proprietary license'
7 * or 'BSD 3-clause "New" or "Revised" License' , at your option.
8 *
9 ********************************************************************************
10 *
11 * 'STMicroelectronics Proprietary license'
12 *
13 ********************************************************************************
14 *
15 * License terms: STMicroelectronics Proprietary in accordance with licensing
16 * terms at www.st.com/sla0081
17 *
18 * STMicroelectronics confidential
19 * Reproduction and Communication of this document is strictly prohibited unless
20 * specifically authorized in writing by STMicroelectronics.
21 *
22 *
23 ********************************************************************************
24 *
25 * Alternatively, VL53L1 Core may be distributed under the terms of
26 * 'BSD 3-clause "New" or "Revised" License', in which case the following
27 * provisions apply instead of the ones mentioned above :
28 *
29 ********************************************************************************
30 *
31 * License terms: BSD 3-clause "New" or "Revised" License.
32 *
33 * Redistribution and use in source and binary forms, with or without
34 * modification, are permitted provided that the following conditions are met:
35 *
36 * 1. Redistributions of source code must retain the above copyright notice, this
37 * list of conditions and the following disclaimer.
38 *
39 * 2. Redistributions in binary form must reproduce the above copyright notice,
40 * this list of conditions and the following disclaimer in the documentation
41 * and/or other materials provided with the distribution.
42 *
43 * 3. Neither the name of the copyright holder nor the names of its contributors
44 * may be used to endorse or promote products derived from this software
45 * without specific prior written permission.
46 *
47 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
48 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
50 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
51 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
53 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
54 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
55 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
56 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
57 *
58 *
59 ********************************************************************************
60 *
61 */
62 
63 /**
64  * @file vl53l1_tuning_parm_defaults.h
65  *
66  * @brief Define defaults for tuning parm list
67  *
68  * - Ensures coherence of internal defaults to tuning table
69  * - Allows reduction of tuning parm list to only changes from the
70  * standard settings defined below
71  *
72  */
73 
74 
75 #ifndef _VL53L1_TUNING_PARM_DEFAULTS_H_
76 #define _VL53L1_TUNING_PARM_DEFAULTS_H_
77 
78 
79 #ifdef __cplusplus
80 extern "C" {
81 #endif
82 
83 /** @defgroup VL53L1_tuningparmdefault_group VL53L1 Defines
84  *  @brief    VL53L1 Tuning Parm Default Values
85  *  @{
86  */
87 
88 #define VL53L1_TUNINGPARM_VERSION_DEFAULT \
89 ((uint16_t) 32771)
90 #define VL53L1_TUNINGPARM_KEY_TABLE_VERSION_DEFAULT \
91 ((uint16_t) 32769)
92 #define VL53L1_TUNINGPARM_LLD_VERSION_DEFAULT \
93 ((uint16_t) 32833)
94 #define VL53L1_TUNINGPARM_CONSISTENCY_LITE_PHASE_TOLERANCE_DEFAULT \
95 ((uint8_t) 2)
96 #define VL53L1_TUNINGPARM_PHASECAL_TARGET_DEFAULT \
97 ((uint8_t) 33)
98 #define VL53L1_TUNINGPARM_LITE_CAL_REPEAT_RATE_DEFAULT \
99 ((uint16_t) 0)
100 #define VL53L1_TUNINGPARM_LITE_RANGING_GAIN_FACTOR_DEFAULT \
101 ((uint16_t) 2011)
102 #define VL53L1_TUNINGPARM_LITE_MIN_CLIP_MM_DEFAULT \
103 ((uint8_t) 0)
104 #define VL53L1_TUNINGPARM_LITE_LONG_SIGMA_THRESH_MM_DEFAULT \
105 ((uint16_t) 360)
106 #define VL53L1_TUNINGPARM_LITE_MED_SIGMA_THRESH_MM_DEFAULT \
107 ((uint16_t) 360)
108 #define VL53L1_TUNINGPARM_LITE_SHORT_SIGMA_THRESH_MM_DEFAULT \
109 ((uint16_t) 360)
110 #define VL53L1_TUNINGPARM_LITE_LONG_MIN_COUNT_RATE_RTN_MCPS_DEFAULT \
111 ((uint16_t) 192)
112 #define VL53L1_TUNINGPARM_LITE_MED_MIN_COUNT_RATE_RTN_MCPS_DEFAULT \
113 ((uint16_t) 192)
114 #define VL53L1_TUNINGPARM_LITE_SHORT_MIN_COUNT_RATE_RTN_MCPS_DEFAULT \
115 ((uint16_t) 192)
116 #define VL53L1_TUNINGPARM_LITE_SIGMA_EST_PULSE_WIDTH_DEFAULT \
117 ((uint8_t) 8)
118 #define VL53L1_TUNINGPARM_LITE_SIGMA_EST_AMB_WIDTH_NS_DEFAULT \
119 ((uint8_t) 16)
120 #define VL53L1_TUNINGPARM_LITE_SIGMA_REF_MM_DEFAULT \
121 ((uint8_t) 1)
122 #define VL53L1_TUNINGPARM_LITE_RIT_MULT_DEFAULT \
123 ((uint8_t) 64)
124 #define VL53L1_TUNINGPARM_LITE_SEED_CONFIG_DEFAULT \
125 ((uint8_t) 2)
126 #define VL53L1_TUNINGPARM_LITE_QUANTIFIER_DEFAULT \
127 ((uint8_t) 2)
128 #define VL53L1_TUNINGPARM_LITE_FIRST_ORDER_SELECT_DEFAULT \
129 ((uint8_t) 0)
130 #define VL53L1_TUNINGPARM_LITE_XTALK_MARGIN_KCPS_DEFAULT \
131 ((int16_t) 0)
132 #define VL53L1_TUNINGPARM_INITIAL_PHASE_RTN_LITE_LONG_RANGE_DEFAULT \
133 ((uint8_t) 14)
134 #define VL53L1_TUNINGPARM_INITIAL_PHASE_RTN_LITE_MED_RANGE_DEFAULT \
135 ((uint8_t) 10)
136 #define VL53L1_TUNINGPARM_INITIAL_PHASE_RTN_LITE_SHORT_RANGE_DEFAULT \
137 ((uint8_t) 6)
138 #define VL53L1_TUNINGPARM_INITIAL_PHASE_REF_LITE_LONG_RANGE_DEFAULT \
139 ((uint8_t) 14)
140 #define VL53L1_TUNINGPARM_INITIAL_PHASE_REF_LITE_MED_RANGE_DEFAULT \
141 ((uint8_t) 10)
142 #define VL53L1_TUNINGPARM_INITIAL_PHASE_REF_LITE_SHORT_RANGE_DEFAULT \
143 ((uint8_t) 6)
144 #define VL53L1_TUNINGPARM_TIMED_SEED_CONFIG_DEFAULT \
145 ((uint8_t) 1)
146 #define VL53L1_TUNINGPARM_VHV_LOOPBOUND_DEFAULT \
147 ((uint8_t) 32)
148 #define VL53L1_TUNINGPARM_REFSPADCHAR_DEVICE_TEST_MODE_DEFAULT \
149 ((uint8_t) 8)
150 #define VL53L1_TUNINGPARM_REFSPADCHAR_VCSEL_PERIOD_DEFAULT \
151 ((uint8_t) 11)
152 #define VL53L1_TUNINGPARM_REFSPADCHAR_PHASECAL_TIMEOUT_US_DEFAULT \
153 ((uint32_t) 1000)
154 #define VL53L1_TUNINGPARM_REFSPADCHAR_TARGET_COUNT_RATE_MCPS_DEFAULT \
155 ((uint16_t) 2560)
156 #define VL53L1_TUNINGPARM_REFSPADCHAR_MIN_COUNTRATE_LIMIT_MCPS_DEFAULT \
157 ((uint16_t) 1280)
158 #define VL53L1_TUNINGPARM_REFSPADCHAR_MAX_COUNTRATE_LIMIT_MCPS_DEFAULT \
159 ((uint16_t) 5120)
160 #define VL53L1_TUNINGPARM_OFFSET_CAL_DSS_RATE_MCPS_DEFAULT \
161 ((uint16_t) 2560)
162 #define VL53L1_TUNINGPARM_OFFSET_CAL_PHASECAL_TIMEOUT_US_DEFAULT \
163 ((uint32_t) 1000)
164 #define VL53L1_TUNINGPARM_OFFSET_CAL_MM_TIMEOUT_US_DEFAULT \
165 ((uint32_t) 13000)
166 #define VL53L1_TUNINGPARM_OFFSET_CAL_RANGE_TIMEOUT_US_DEFAULT \
167 ((uint32_t) 13000)
168 #define VL53L1_TUNINGPARM_OFFSET_CAL_PRE_SAMPLES_DEFAULT \
169 ((uint8_t) 8)
170 #define VL53L1_TUNINGPARM_OFFSET_CAL_MM1_SAMPLES_DEFAULT \
171 ((uint8_t) 40)
172 #define VL53L1_TUNINGPARM_OFFSET_CAL_MM2_SAMPLES_DEFAULT \
173 ((uint8_t) 9)
174 #define VL53L1_TUNINGPARM_SPADMAP_VCSEL_PERIOD_DEFAULT \
175 ((uint8_t) 18)
176 #define VL53L1_TUNINGPARM_SPADMAP_VCSEL_START_DEFAULT \
177 ((uint8_t) 15)
178 #define VL53L1_TUNINGPARM_SPADMAP_RATE_LIMIT_MCPS_DEFAULT \
179 ((uint16_t) 12)
180 #define VL53L1_TUNINGPARM_LITE_DSS_CONFIG_TARGET_TOTAL_RATE_MCPS_DEFAULT \
181 ((uint16_t) 2560)
182 #define VL53L1_TUNINGPARM_TIMED_DSS_CONFIG_TARGET_TOTAL_RATE_MCPS_DEFAULT \
183 ((uint16_t) 2560)
184 #define VL53L1_TUNINGPARM_LITE_PHASECAL_CONFIG_TIMEOUT_US_DEFAULT \
185 ((uint32_t) 1000)
186 #define VL53L1_TUNINGPARM_TIMED_PHASECAL_CONFIG_TIMEOUT_US_DEFAULT \
187 ((uint32_t) 1000)
188 #define VL53L1_TUNINGPARM_LITE_MM_CONFIG_TIMEOUT_US_DEFAULT \
189 ((uint32_t) 2000)
190 #define VL53L1_TUNINGPARM_TIMED_MM_CONFIG_TIMEOUT_US_DEFAULT \
191 ((uint32_t) 2000)
192 #define VL53L1_TUNINGPARM_LITE_RANGE_CONFIG_TIMEOUT_US_DEFAULT \
193 ((uint32_t) 63000)
194 #define VL53L1_TUNINGPARM_TIMED_RANGE_CONFIG_TIMEOUT_US_DEFAULT \
195 ((uint32_t) 13000)
196 #define VL53L1_TUNINGPARM_LOWPOWERAUTO_VHV_LOOP_BOUND_DEFAULT \
197 ((uint8_t) 3)
198 #define VL53L1_TUNINGPARM_LOWPOWERAUTO_MM_CONFIG_TIMEOUT_US_DEFAULT \
199 ((uint32_t) 700)
200 #define VL53L1_TUNINGPARM_LOWPOWERAUTO_RANGE_CONFIG_TIMEOUT_US_DEFAULT \
201 ((uint32_t) 8000)
202 
203 
204 #ifdef __cplusplus
205 }
206 #endif
207 
208 #endif /* _VL53L1_LL_DEF_H_ */
209 
210 
211