AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches
argus_dca.h
Go to the documentation of this file.
1/*************************************************************************/
38#ifndef ARGUS_DCA_H
39#define ARGUS_DCA_H
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/*!***************************************************************************
45 * @defgroup argus_dca Dynamic Configuration Adaption
46 * @ingroup argus_api
47 *
48 * @brief Dynamic Configuration Adaption (DCA) parameter definitions and API functions.
49 *
50 * @details The DCA contains an algorithms that detect ambient conditions
51 * and adopt the device configuration to the changing parameters
52 * dynamically while operating the sensor. This is achieved by
53 * rating the currently received signal quality and changing the
54 * device configuration accordingly to the gathered information
55 * from the current measurement frame results before the next
56 * integration cycle starts.
57 *
58 * The DCA consists of the following features:
59 * - Static or Dynamic mode. The first is utilizing the nominal
60 * values while the latter is dynamically adopting between min.
61 * and max. value and starting from the nominal values.
62 * - Analog Integration Depth Adaption (from multiple patterns down to single pulses)
63 * - Optical Output Power Adaption
64 * - Pixel Input Gain Adaption (w/ ambient light rejection)
65 * - ADC Sensitivity (i.e. ADC Range) Adaption
66 * - Power Saving Ratio (to decrease the average output power and thus the current consumption)
67 * - All that features are heeding the Laser Safety limits.
68 * .
69 *
70 * @addtogroup argus_dca
71 * @{
72 *****************************************************************************/
73
74#include "argus_def.h"
75
76
77
79#define ARGUS_CFG_DCA_ATH_MIN (1U << 6U)
80
82#define ARGUS_CFG_DCA_ATH_MAX (0xFFFFU)
83
84
86#define ARGUS_CFG_DCA_PXTH_MIN (1U)
87
89#define ARGUS_CFG_DCA_PXTH_MAX (33U)
90
91
94#define ARGUS_CFG_DCA_DEPTH_MAX ((uq10_6_t)(0xFFC0U))
95
98#define ARGUS_CFG_DCA_DEPTH_MIN ((uq10_6_t)(1U)) // 1/64, i.e. 1/2 nibble
99
100
102#define ARGUS_DCA_GAIN_STAGE_COUNT (4U)
103
105#define ARGUS_STATE_DCA_GAIN_MASK (0x03U)
106
108#define ARGUS_STATE_DCA_GAIN_SHIFT (14U)
109
111#define ARGUS_STATE_DCA_GAIN_GET(state) \
112 (((state) >> ARGUS_STATE_DCA_GAIN_SHIFT) & ARGUS_STATE_DCA_GAIN_MASK)
113
114
116#define ARGUS_DCA_POWER_STAGE_COUNT (2U)
117
119#define ARGUS_STATE_DCA_POWER_MASK (0x01U)
120
122#define ARGUS_STATE_DCA_POWER_SHIFT (13U)
123
125#define ARGUS_STATE_DCA_POWER_GET(state) \
126 (((state) >> ARGUS_STATE_DCA_POWER_SHIFT) & ARGUS_STATE_DCA_POWER_MASK)
127
128
129
130
131/*!***************************************************************************
132 * @brief The dynamic configuration algorithm enable flags.
133 *****************************************************************************/
152
153/*!***************************************************************************
154 * @brief The DCA amplitude evaluation method.
155 *****************************************************************************/
165
166/*!***************************************************************************
167 * @brief The dynamic configuration algorithm Optical Output Power stages enumerator.
168 *****************************************************************************/
181
182/*!***************************************************************************
183 * @brief The dynamic configuration algorithm Pixel Input Gain stages enumerator.
184 *****************************************************************************/
200
201
202/*!***************************************************************************
203 * @brief State flags for the current frame.
204 * @details State flags determine the current state of the measurement frame:
205 * - [0]: #ARGUS_STATE_XTALK_MONITOR_ACTIVE
206 * - [1]: #ARGUS_STATE_DUAL_FREQ_MODE
207 * - [2]: #ARGUS_STATE_MEASUREMENT_FREQ
208 * - [3]: #ARGUS_STATE_DEBUG_MODE
209 * - [4]: #ARGUS_STATE_WEAK_SIGNAL
210 * - [5]: #ARGUS_STATE_BGL_WARNING
211 * - [6]: #ARGUS_STATE_BGL_ERROR
212 * - [7]: #ARGUS_STATE_PLL_LOCKED
213 * - [8]: #ARGUS_STATE_LASER_WARNING
214 * - [9]: #ARGUS_STATE_LASER_ERROR
215 * - [10]: #ARGUS_STATE_HAS_DATA
216 * - [11]: #ARGUS_STATE_HAS_AUX_DATA
217 * - [12]: #ARGUS_STATE_SATURATED_PIXELS
218 * - [13]: DCA Power Stage
219 * - [14-15]: DCA Gain Stages
220 * - [16]: #ARGUS_STATE_DCA_MIN
221 * - [17]: #ARGUS_STATE_DCA_MAX
222 * - [18]: #ARGUS_STATE_DCA_RESET
223 * - [18-31]: not used
224 * .
225 *****************************************************************************/
356
357/*!***************************************************************************
358 * @brief Dynamic Configuration Adaption (DCA) Parameters.
359 * @details DCA contains:
360 * - Static or dynamic mode. The first is utilizing the nominal values
361 * while the latter is dynamically adopting between min. and max.
362 * value and starting form the nominal values.
363 * - Analog Integration Depth Adaption down to single pulses.
364 * - Optical Output Power Adaption
365 * - Pixel Input Gain Adaption
366 * - Digital Integration Depth Adaption
367 * - Dynamic Global Phase Shift Injection.
368 * - All that features are heeding the Laser Safety limits.
369 * .
370 *****************************************************************************/
518
520#ifdef __cplusplus
521} // extern "C"
522#endif
523#endif /* ARGUS_DCA_H */
This file is part of the AFBR-S50 hardware API.
argus_dca_power_t
The dynamic configuration algorithm Optical Output Power stages enumerator.
Definition argus_dca.h:170
argus_dca_gain_t
The dynamic configuration algorithm Pixel Input Gain stages enumerator.
Definition argus_dca.h:186
argus_dca_enable_t
The dynamic configuration algorithm enable flags.
Definition argus_dca.h:135
#define ARGUS_STATE_DCA_POWER_SHIFT
Definition argus_dca.h:122
#define ARGUS_STATE_DCA_GAIN_SHIFT
Definition argus_dca.h:108
argus_state_t
State flags for the current frame.
Definition argus_dca.h:227
argus_dca_amplitude_mode_t
The DCA amplitude evaluation method.
Definition argus_dca.h:157
@ DCA_POWER_AUTO
Definition argus_dca.h:178
@ DCA_POWER_HIGH
Definition argus_dca.h:175
@ DCA_POWER_LOW
Definition argus_dca.h:172
@ DCA_GAIN_LOW
Definition argus_dca.h:188
@ DCA_GAIN_MEDIUM_HIGH
Definition argus_dca.h:194
@ DCA_GAIN_MEDIUM_LOW
Definition argus_dca.h:191
@ DCA_GAIN_HIGH
Definition argus_dca.h:197
@ DCA_ENABLE_OFF
Definition argus_dca.h:143
@ DCA_ENABLE_STATIC
Definition argus_dca.h:149
@ DCA_ENABLE_DYNAMIC
Definition argus_dca.h:146
@ ARGUS_STATE_DCA_GAIN_MED_LOW
Definition argus_dca.h:322
@ ARGUS_STATE_PLL_LOCKED
Definition argus_dca.h:279
@ ARGUS_STATE_LASER_WARNING
Definition argus_dca.h:288
@ ARGUS_STATE_DCA_RESET
Definition argus_dca.h:353
@ ARGUS_STATE_NONE
Definition argus_dca.h:229
@ ARGUS_STATE_DCA_POWER_HIGH
Definition argus_dca.h:316
@ ARGUS_STATE_DCA_GAIN_HIGH
Definition argus_dca.h:328
@ ARGUS_STATE_DCA_MAX
Definition argus_dca.h:346
@ ARGUS_STATE_BGL_WARNING
Definition argus_dca.h:267
@ ARGUS_STATE_HAS_AUX_DATA
Definition argus_dca.h:306
@ ARGUS_STATE_XTALK_MONITOR_ACTIVE
Definition argus_dca.h:234
@ ARGUS_STATE_SATURATED_PIXELS
Definition argus_dca.h:313
@ ARGUS_STATE_HAS_DATA
Definition argus_dca.h:301
@ ARGUS_STATE_LASER_ERROR
Definition argus_dca.h:296
@ ARGUS_STATE_DEBUG_MODE
Definition argus_dca.h:252
@ ARGUS_STATE_DCA_GAIN_MED_HIGH
Definition argus_dca.h:325
@ ARGUS_STATE_DCA_MIN
Definition argus_dca.h:337
@ ARGUS_STATE_MEASUREMENT_FREQ
Definition argus_dca.h:245
@ ARGUS_STATE_WEAK_SIGNAL
Definition argus_dca.h:260
@ ARGUS_STATE_DCA_GAIN_LOW
Definition argus_dca.h:319
@ ARGUS_STATE_BGL_ERROR
Definition argus_dca.h:274
@ ARGUS_STATE_DUAL_FREQ_MODE
Definition argus_dca.h:239
@ DCA_AMPLITUDE_MAX
Definition argus_dca.h:159
@ DCA_AMPLITUDE_AVG
Definition argus_dca.h:162
uint8_t uq0_8_t
Unsigned fixed point number: UQ0.8.
Definition fp_def.h:162
uint16_t uq10_6_t
Unsigned fixed point number: UQ10.6.
Definition fp_def.h:251
uint16_t uq12_4_t
Unsigned fixed point number: UQ12.4.
Definition fp_def.h:231
Dynamic Configuration Adaption (DCA) Parameters.
Definition argus_dca.h:372
uq10_6_t DepthNom
Definition argus_dca.h:456
uint8_t SatPxThRst
Definition argus_dca.h:413
uq12_4_t AthHigh
Definition argus_dca.h:439
uq10_6_t DepthMin
Definition argus_dca.h:464
argus_dca_enable_t Enabled
Definition argus_dca.h:376
argus_dca_gain_t GainMax
Definition argus_dca.h:496
uq12_4_t Atarget
Definition argus_dca.h:422
uint8_t SatPxThLin
Definition argus_dca.h:389
uq12_4_t AthLow
Definition argus_dca.h:430
uq10_6_t DepthMax
Definition argus_dca.h:472
argus_dca_gain_t GainMin
Definition argus_dca.h:488
uq0_8_t PowerSavingRatio
Definition argus_dca.h:515
uint8_t SatPxThExp
Definition argus_dca.h:400
argus_dca_amplitude_mode_t AmplitudeMode
Definition argus_dca.h:444
argus_dca_gain_t GainNom
Definition argus_dca.h:480
argus_dca_power_t Power
Definition argus_dca.h:448