AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches
Dynamic Configuration Adaption

Dynamic Configuration Adaption (DCA) parameter definitions and API functions. More...

Collaboration diagram for Dynamic Configuration Adaption:

Data Structures

struct  argus_cfg_dca_t
 Dynamic Configuration Adaption (DCA) Parameters. More...
 

Macros

#define ARGUS_CFG_DCA_ATH_MIN   (1U << 6U)
 
#define ARGUS_CFG_DCA_ATH_MAX   (0xFFFFU)
 
#define ARGUS_CFG_DCA_PXTH_MIN   (1U)
 
#define ARGUS_CFG_DCA_PXTH_MAX   (33U)
 
#define ARGUS_CFG_DCA_DEPTH_MAX   ((uq10_6_t)(0xFFC0U))
 
#define ARGUS_CFG_DCA_DEPTH_MIN   ((uq10_6_t)(1U))
 
#define ARGUS_DCA_GAIN_STAGE_COUNT   (4U)
 
#define ARGUS_STATE_DCA_GAIN_MASK   (0x03U)
 
#define ARGUS_STATE_DCA_GAIN_SHIFT   (14U)
 
#define ARGUS_STATE_DCA_GAIN_GET(state)    (((state) >> ARGUS_STATE_DCA_GAIN_SHIFT) & ARGUS_STATE_DCA_GAIN_MASK)
 
#define ARGUS_DCA_POWER_STAGE_COUNT   (2U)
 
#define ARGUS_STATE_DCA_POWER_MASK   (0x01U)
 
#define ARGUS_STATE_DCA_POWER_SHIFT   (13U)
 
#define ARGUS_STATE_DCA_POWER_GET(state)    (((state) >> ARGUS_STATE_DCA_POWER_SHIFT) & ARGUS_STATE_DCA_POWER_MASK)
 

Enumerations

enum  argus_dca_enable_t {
  DCA_ENABLE_OFF = 0 ,
  DCA_ENABLE_DYNAMIC = 1 ,
  DCA_ENABLE_STATIC = -1
}
 The dynamic configuration algorithm enable flags. More...
 
enum  argus_dca_amplitude_mode_t {
  DCA_AMPLITUDE_MAX = 1U ,
  DCA_AMPLITUDE_AVG = 2U
}
 The DCA amplitude evaluation method. More...
 
enum  argus_dca_power_t {
  DCA_POWER_LOW = 0 ,
  DCA_POWER_HIGH = 1 ,
  DCA_POWER_AUTO = 2
}
 The dynamic configuration algorithm Optical Output Power stages enumerator. More...
 
enum  argus_dca_gain_t {
  DCA_GAIN_LOW = 0 ,
  DCA_GAIN_MEDIUM_LOW = 1 ,
  DCA_GAIN_MEDIUM_HIGH = 2 ,
  DCA_GAIN_HIGH = 3
}
 The dynamic configuration algorithm Pixel Input Gain stages enumerator. More...
 
enum  argus_state_t {
  ARGUS_STATE_NONE = 0 ,
  ARGUS_STATE_XTALK_MONITOR_ACTIVE = 1U << 0U ,
  ARGUS_STATE_DUAL_FREQ_MODE = 1U << 1U ,
  ARGUS_STATE_MEASUREMENT_FREQ = 1U << 2U ,
  ARGUS_STATE_DEBUG_MODE = 1U << 3U ,
  ARGUS_STATE_WEAK_SIGNAL = 1U << 4U ,
  ARGUS_STATE_BGL_WARNING = 1U << 5U ,
  ARGUS_STATE_BGL_ERROR = 1U << 6U ,
  ARGUS_STATE_PLL_LOCKED = 1U << 7U ,
  ARGUS_STATE_LASER_WARNING = 1U << 8U ,
  ARGUS_STATE_LASER_ERROR = 1U << 9U ,
  ARGUS_STATE_HAS_DATA = 1U << 10U ,
  ARGUS_STATE_HAS_AUX_DATA = 1U << 11U ,
  ARGUS_STATE_SATURATED_PIXELS = 1U << 12U ,
  ARGUS_STATE_DCA_POWER_HIGH = DCA_POWER_HIGH << ARGUS_STATE_DCA_POWER_SHIFT ,
  ARGUS_STATE_DCA_GAIN_LOW = DCA_GAIN_LOW << ARGUS_STATE_DCA_GAIN_SHIFT ,
  ARGUS_STATE_DCA_GAIN_MED_LOW = DCA_GAIN_MEDIUM_LOW << ARGUS_STATE_DCA_GAIN_SHIFT ,
  ARGUS_STATE_DCA_GAIN_MED_HIGH = DCA_GAIN_MEDIUM_HIGH << ARGUS_STATE_DCA_GAIN_SHIFT ,
  ARGUS_STATE_DCA_GAIN_HIGH = DCA_GAIN_HIGH << ARGUS_STATE_DCA_GAIN_SHIFT ,
  ARGUS_STATE_DCA_MIN = 1U << 16U ,
  ARGUS_STATE_DCA_MAX = 1U << 17U ,
  ARGUS_STATE_DCA_RESET = 1U << 18U
}
 State flags for the current frame. More...
 

Detailed Description

Dynamic Configuration Adaption (DCA) parameter definitions and API functions.


The DCA contains an algorithms that detect ambient conditions and adopt the device configuration to the changing parameters dynamically while operating the sensor. This is achieved by rating the currently received signal quality and changing the device configuration accordingly to the gathered information from the current measurement frame results before the next integration cycle starts.

The DCA consists of the following features:

Macro Definition Documentation

◆ ARGUS_CFG_DCA_ATH_MAX

#define ARGUS_CFG_DCA_ATH_MAX   (0xFFFFU)

The maximum amplitude threshold value.

◆ ARGUS_CFG_DCA_ATH_MIN

#define ARGUS_CFG_DCA_ATH_MIN   (1U << 6U)

The minimum amplitude threshold value.

◆ ARGUS_CFG_DCA_DEPTH_MAX

#define ARGUS_CFG_DCA_DEPTH_MAX   ((uq10_6_t)(0xFFC0U))

The maximum analog integration depth in UQ10.6 format, i.e. the maximum pattern count per sample.

◆ ARGUS_CFG_DCA_DEPTH_MIN

#define ARGUS_CFG_DCA_DEPTH_MIN   ((uq10_6_t)(1U))

The minimum analog integration depth in UQ10.6 format, i.e. the minimum pattern count per sample.

◆ ARGUS_CFG_DCA_PXTH_MAX

#define ARGUS_CFG_DCA_PXTH_MAX   (33U)

The maximum saturated pixel threshold value.

◆ ARGUS_CFG_DCA_PXTH_MIN

#define ARGUS_CFG_DCA_PXTH_MIN   (1U)

The minimum saturated pixel threshold value.

◆ ARGUS_DCA_GAIN_STAGE_COUNT

#define ARGUS_DCA_GAIN_STAGE_COUNT   (4U)

The dynamic configuration algorithm Pixel Input Gain stage count.

◆ ARGUS_DCA_POWER_STAGE_COUNT

#define ARGUS_DCA_POWER_STAGE_COUNT   (2U)

The dynamic configuration algorithm Optical Output Power stage count.

◆ ARGUS_STATE_DCA_GAIN_GET

#define ARGUS_STATE_DCA_GAIN_GET (   state)     (((state) >> ARGUS_STATE_DCA_GAIN_SHIFT) & ARGUS_STATE_DCA_GAIN_MASK)

Getter for the dynamic configuration algorithm Pixel Input Gain stage.

◆ ARGUS_STATE_DCA_GAIN_MASK

#define ARGUS_STATE_DCA_GAIN_MASK   (0x03U)

The dynamic configuration algorithm state mask for the Pixel Input Gain stage.

◆ ARGUS_STATE_DCA_GAIN_SHIFT

#define ARGUS_STATE_DCA_GAIN_SHIFT   (14U)

The dynamic configuration algorithm state mask for the Pixel Input Gain stage.

◆ ARGUS_STATE_DCA_POWER_GET

#define ARGUS_STATE_DCA_POWER_GET (   state)     (((state) >> ARGUS_STATE_DCA_POWER_SHIFT) & ARGUS_STATE_DCA_POWER_MASK)

Getter for the dynamic configuration algorithm Optical Output Power stage.

◆ ARGUS_STATE_DCA_POWER_MASK

#define ARGUS_STATE_DCA_POWER_MASK   (0x01U)

The dynamic configuration algorithm state mask for the Optical Output Power stage.

◆ ARGUS_STATE_DCA_POWER_SHIFT

#define ARGUS_STATE_DCA_POWER_SHIFT   (13U)

The dynamic configuration algorithm state mask for the Optical Output Power stage.

Enumeration Type Documentation

◆ argus_dca_amplitude_mode_t

The DCA amplitude evaluation method.


Enumerator
DCA_AMPLITUDE_MAX 

Evaluate the DCA amplitude as the maximum of all valid amplitudes.

DCA_AMPLITUDE_AVG 

Evaluate the DCA amplitude as the average of all valid amplitudes.

◆ argus_dca_enable_t

The dynamic configuration algorithm enable flags.


Enumerator
DCA_ENABLE_OFF 
DCA_ENABLE_DYNAMIC 

DCA is enabled and will dynamically adjust the device configuration.

DCA_ENABLE_STATIC 

DCA is enabled and will apply the static (nominal) values to the device.

◆ argus_dca_gain_t

The dynamic configuration algorithm Pixel Input Gain stages enumerator.


Enumerator
DCA_GAIN_LOW 

Low gain stage.

DCA_GAIN_MEDIUM_LOW 

Medium low gain stage.

DCA_GAIN_MEDIUM_HIGH 

Medium high gain stage.

DCA_GAIN_HIGH 

High gain stage.

◆ argus_dca_power_t

The dynamic configuration algorithm Optical Output Power stages enumerator.


Enumerator
DCA_POWER_LOW 

Use low output power stage.

DCA_POWER_HIGH 

Use high output power stage.

DCA_POWER_AUTO 

Use low and high output power stages automatically.

◆ argus_state_t

State flags for the current frame.


State flags determine the current state of the measurement frame:

Enumerator
ARGUS_STATE_NONE 

No state flag set.

ARGUS_STATE_XTALK_MONITOR_ACTIVE 

0x0001: Crosstalk Monitor is enabled and updating.

  • 0: Inactive: crosstalk monitor values are not updated,
  • 1: Active: crosstalk monitor values are updated.
ARGUS_STATE_DUAL_FREQ_MODE 

0x0002: Dual Frequency Mode Enabled.

  • 0: Disabled: measurements with base frequency,
  • 1: Enabled: measurement with detuned frequency.
ARGUS_STATE_MEASUREMENT_FREQ 

0x0004: Measurement Frequency for Dual Frequency Mode
(only if ARGUS_STATE_DUAL_FREQ_MODE flag is set).

  • 0: A-Frame w/ detuned frequency,
  • 1: B-Frame w/ detuned frequency
ARGUS_STATE_DEBUG_MODE 

0x0008: Debug Mode.
If set, the range value of erroneous pixels are not cleared or reset.

  • 0: Disabled (default).
  • 1: Enabled.
ARGUS_STATE_WEAK_SIGNAL 

0x0010: Weak Signal Flag.
Set whenever the Pixel Binning Algorithm is detecting a weak signal, i.e. if the amplitude dies not reach its (absolute) threshold.

  • 0: Normal Signal.
  • 1: Weak Signal.
ARGUS_STATE_BGL_WARNING 

0x0020: Background Light Warning Flag.
Set whenever the background light is very high and the measurement data might be unreliable.

  • 0: No Warning: Background Light is within valid range.
  • 1: Warning: Background Light is very high.
ARGUS_STATE_BGL_ERROR 

0x0040: Background Light Error Flag.
Set whenever the background light is too high and the measurement data is unreliable or invalid.

  • 0: No Error: Background Light is within valid range.
  • 1: Error: Background Light is too high.
ARGUS_STATE_PLL_LOCKED 

0x0080: PLL_LOCKED bit.

  • 0: PLL not locked at start of integration.
  • 1: PLL locked at start of integration.
ARGUS_STATE_LASER_WARNING 

0x0100: Laser Failure Warning Flag.
Set whenever the an invalid system condition is detected. (i.e. DCA at max state but no amplitude on any (incl. reference) pixel, not amplitude but any saturated pixel).

  • 0: No Warning: Laser is operating properly.
  • 1: Warning: Invalid laser conditions detected. If the invalid condition stays, a laser malfunction error is raised.
ARGUS_STATE_LASER_ERROR 

0x0200: Laser Failure Error Flag.
Set whenever a laser malfunction error is raised and the system is put into a safe state.

  • 0: No Error: Laser is operating properly.
  • 1: Error: Invalid laser conditions are detected for a certain soak time and the system is put into a safe state.
ARGUS_STATE_HAS_DATA 

0x0400: Set if current frame has distance measurement data available.

  • 0: No measurement data available, all values are 0 or stalled.
  • 1: Measurement data is available and correctly evaluated.
ARGUS_STATE_HAS_AUX_DATA 

0x0800: Set if current frame has auxiliary measurement data available.

  • 0: No auxiliary data available, all values are 0 or stalled.
  • 1: Auxiliary data is available and correctly evaluated.
ARGUS_STATE_SATURATED_PIXELS 

0x0100: Pixel Saturation Flag.
Set whenever any pixel is saturated, i.e. its pixel state is PIXEL_SAT

  • 0: No saturated pixels.
  • 1: Any saturated pixels.
ARGUS_STATE_DCA_POWER_HIGH 

0x2000: DCA is in high Optical Output Power stage.

ARGUS_STATE_DCA_GAIN_LOW 

DCA is in low Pixel Input Gain stage.

ARGUS_STATE_DCA_GAIN_MED_LOW 

0x4000: DCA is in medium-low Pixel Input Gain stage.

ARGUS_STATE_DCA_GAIN_MED_HIGH 

0x8000: DCA is in medium-high Pixel Input Gain stage.

ARGUS_STATE_DCA_GAIN_HIGH 

0xC000: DCA is in high Pixel Input Gain stage.

ARGUS_STATE_DCA_MIN 

0x10000: DCA Minimum State Flag.
Set whenever the DCA has reduced all its parameters to their minimum values and it can not decrease the integration energy any further.

  • 0: DCA has not yet reached its minimum state.
  • 1: DCA has reached its minimum state and can not decrease its parameters any further.
ARGUS_STATE_DCA_MAX 

0x20000: DCA Maximum State Flag.
Set whenever the DCA has extended all its parameters to their maximum values and it can not increase the integration energy any further.

  • 0: DCA has not yet reached its maximum state.
  • 1: DCA has reached its maximum state and can not increase its parameters any further.
ARGUS_STATE_DCA_RESET 

0x20000: DCA Reset State Flag.
Set whenever the DCA is resetting all its parameters to their minimum values because it has detected too many saturated pixels.

  • 0: DCA is operating in normal mode.
  • 1: DCA is performing a reset.