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

Status and Error Code Definitions. More...

Collaboration diagram for Status Codes:

Typedefs

typedef int32_t status_t
 Type used for all status and error return values.
 

Enumerations

enum  Status {
  STATUS_OK = 0 ,
  STATUS_IDLE = 0 ,
  STATUS_IGNORE = 1 ,
  STATUS_BUSY = 2 ,
  STATUS_INITIALIZING = 3 ,
  ERROR_FAIL = -1 ,
  ERROR_ABORTED = -2 ,
  ERROR_READ_ONLY = -3 ,
  ERROR_OUT_OF_RANGE = -4 ,
  ERROR_INVALID_ARGUMENT = -5 ,
  ERROR_TIMEOUT = -6 ,
  ERROR_NOT_INITIALIZED = -7 ,
  ERROR_NOT_SUPPORTED = -8 ,
  ERROR_NOT_IMPLEMENTED = -9 ,
  STATUS_S2PI_GPIO_MODE = 51 ,
  ERROR_S2PI_RX_ERROR = -51 ,
  ERROR_S2PI_TX_ERROR = -52 ,
  ERROR_S2PI_INVALID_STATE = -53 ,
  ERROR_S2PI_INVALID_BAUDRATE = -54 ,
  ERROR_S2PI_INVALID_SLAVE = -55 ,
  ERROR_NVM_EMPTY = -98 ,
  ERROR_NVM_OUT_OF_RANGE = -99 ,
  STATUS_ARGUS_BUFFER_BUSY = 104 ,
  STATUS_ARGUS_POWERLIMIT = 105 ,
  STATUS_ARGUS_PLL_NOT_LOCKED = 106 ,
  STATUS_ARGUS_NO_OBJECT = 108 ,
  STATUS_ARGUS_EEPROM_BIT_ERROR = 109 ,
  STATUS_ARGUS_INVALID_EEPROM = 110 ,
  ERROR_ARGUS_NOT_CONNECTED = -101 ,
  ERROR_ARGUS_INVALID_CFG = -102 ,
  ERROR_ARGUS_BUFFER_EMPTY = -103 ,
  ERROR_ARGUS_INVALID_SLAVE = -104 ,
  ERROR_ARGUS_INVALID_MODE = -105 ,
  ERROR_ARGUS_BIAS_VOLTAGE_REINIT = -107 ,
  ERROR_ARGUS_EEPROM_FAILURE = -109 ,
  ERROR_ARGUS_STALLED = -110 ,
  ERROR_ARGUS_BGL_EXCEEDANCE = -111 ,
  ERROR_ARGUS_XTALK_AMPLITUDE_EXCEEDANCE = -112 ,
  ERROR_ARGUS_LASER_FAILURE = -113 ,
  ERROR_ARGUS_DATA_INTEGRITY_LOST = -114 ,
  ERROR_ARGUS_RANGE_OFFSET_CALIBRATION_FAILED = -115 ,
  ERROR_ARGUS_VSUB_CALIBRATION_FAILED = -116 ,
  ERROR_ARGUS_BUSY = -191 ,
  ERROR_ARGUS_UNKNOWN_MODULE = -199 ,
  ERROR_ARGUS_UNKNOWN_CHIP = -198 ,
  ERROR_ARGUS_UNKNOWN_LASER = -197 ,
  STATUS_ARGUS_BUSY_TEST = 191 ,
  STATUS_ARGUS_BUSY_UPDATE = 192 ,
  STATUS_ARGUS_BUSY_CAL_SEQ = 195 ,
  STATUS_ARGUS_BUSY_MEAS = 196 ,
  STATUS_ARGUS_STARTING = 100 ,
  STATUS_ARGUS_ACTIVE = 103
}
 

Detailed Description

Status and Error Code Definitions.


Defines status and error codes for function return values. Basic status number structure:

Typedef Documentation

◆ status_t

typedef int32_t status_t

Type used for all status and error return values.


Basic status number structure:

  • 0 is OK or no error.
  • negative values determine errors.
  • positive values determine warnings or status information.

Enumeration Type Documentation

◆ Status

enum Status

AFBR-S50 API status and error return codes.

Enumerator
STATUS_OK 

0: Status for success/no error.

STATUS_IDLE 

0: Status for device/module/hardware idle. Implies STATUS_OK.

STATUS_IGNORE 

1: Status to be ignored.

STATUS_BUSY 

2: Status for device/module/hardware busy.

STATUS_INITIALIZING 

3: Status for device/module/hardware is currently initializing.

ERROR_FAIL 

-1: Error for generic fail/error.

ERROR_ABORTED 

-2: Error for process aborted by user/external.

ERROR_READ_ONLY 

-3: Error for invalid read only operations.

ERROR_OUT_OF_RANGE 

-4: Error for out of range parameters.

ERROR_INVALID_ARGUMENT 

-5: Error for invalid argument passed to an function.

ERROR_TIMEOUT 

-6: Error for timeout occurred.

ERROR_NOT_INITIALIZED 

-7: Error for not initialized modules.

ERROR_NOT_SUPPORTED 

-8: Error for not supported.

ERROR_NOT_IMPLEMENTED 

-9: Error for yet not implemented functions.

STATUS_S2PI_GPIO_MODE 

51: SPI is disabled and pins are used in GPIO mode.

ERROR_S2PI_RX_ERROR 

-51: Error occurred on the Rx line.

ERROR_S2PI_TX_ERROR 

-52: Error occurred on the Tx line.

ERROR_S2PI_INVALID_STATE 

-53: Called a function at a wrong driver state.

ERROR_S2PI_INVALID_BAUDRATE 

-54: The specified baud rate is not valid.

ERROR_S2PI_INVALID_SLAVE 

-55: The specified slave identifier is not valid.

ERROR_NVM_EMPTY 

-98: Flash Error: The read memory block was not written previously and contains no data.

ERROR_NVM_OUT_OF_RANGE 

-99: Flash Error: The memory is out of range.

STATUS_ARGUS_BUFFER_BUSY 

104: AFBR-S50 Status: All (internal) raw data buffers are currently in use. The measurement was not executed due to lack of available raw data buffers. Please call Argus_EvaluateData to free the buffers.

STATUS_ARGUS_POWERLIMIT 

105: AFBR-S50 Status: The measurement was not executed/started due to output power limitations.

STATUS_ARGUS_PLL_NOT_LOCKED 

106: AFBR-S50 Status: The PLL was not locked when the measurement was started. The measurement frequency and this the range might be off.

STATUS_ARGUS_NO_OBJECT 

108: AFBR-S50 Status: No object was detected within the field-of-view and measurement range of the device.

STATUS_ARGUS_EEPROM_BIT_ERROR 

109: AFBR-S50 Status: The readout algorithm for the EEPROM has detected a bit error which has been corrected. However, if more than a single bit error has occurred, the corrected value is invalid! This cannot be distinguished from the valid case. Thus, if the error starts to occur, the sensor should be replaced soon!

STATUS_ARGUS_INVALID_EEPROM 

110: AFBR-S50 Status: Inconsistent EEPROM readout data. No calibration trimming values are applied. The calibration remains invalid.

ERROR_ARGUS_NOT_CONNECTED 

-101: AFBR-S50 Error: No device connected. Initial SPI tests failed.

ERROR_ARGUS_INVALID_CFG 

-102: AFBR-S50 Error: Inconsistent configuration parameters.

ERROR_ARGUS_BUFFER_EMPTY 

-103: AFBR-S50 Error: The evaluation function has been called but no raw data is available yet. See also Argus_EvaluateData for more information.

ERROR_ARGUS_INVALID_SLAVE 

-104: AFBR-S50 Error: Invalid slave identifier is passed to the module.

ERROR_ARGUS_INVALID_MODE 

-105: AFBR-S50 Error: Invalid measurement mode configuration parameter.

ERROR_ARGUS_BIAS_VOLTAGE_REINIT 

-107: AFBR-S50 Error: The APD bias voltage is reinitializing due to a dropout. The current measurement data set is invalid!

ERROR_ARGUS_EEPROM_FAILURE 

-109: AFBR-S50 Error: The EEPROM readout has failed. The failure is detected by three distinct read attempts, each resulting in invalid data. Note: this state differs from that STATUS_ARGUS_EEPROM_BIT_ERROR such that it is usually temporarily and due to harsh ambient conditions.

ERROR_ARGUS_STALLED 

-110: AFBR-S50 Error: The measurement signals of all active pixels are invalid and thus the 1D range is also invalid and stalled. This means the range value is not updated and kept at the previous valid value.

ERROR_ARGUS_BGL_EXCEEDANCE 

-111: AFBR-S50 Error: The background light is too bright.

ERROR_ARGUS_XTALK_AMPLITUDE_EXCEEDANCE 

-112: AFBR-S50 Error: The crosstalk vector amplitude is too high.

ERROR_ARGUS_LASER_FAILURE 

-113: AFBR-S50 Error: Laser malfunction! Laser Safety may not be given!

ERROR_ARGUS_DATA_INTEGRITY_LOST 

-114: AFBR-S50 Error: Register data integrity is lost (e.g. due to unexpected power-on-reset cycle or invalid write cycle of SPI. System tries to reset the values.

Note
If this error occurs after intentionally cycling the power supply of the device, use the Argus_RestoreDeviceState API function to properly recover the current API state into the device to avoid that issue.
ERROR_ARGUS_RANGE_OFFSET_CALIBRATION_FAILED 

-115: AFBR-S50 Error: The range offsets calibration failed!

ERROR_ARGUS_VSUB_CALIBRATION_FAILED 

-116: AFBR-S50 Error: The VSUB calibration failed!

ERROR_ARGUS_BUSY 

-191: AFBR-S50 Error: The device is currently busy and cannot execute the requested command.

ERROR_ARGUS_UNKNOWN_MODULE 

-199: AFBR-S50 Error: Unknown module number.

ERROR_ARGUS_UNKNOWN_CHIP 

-198: AFBR-S50 Error: Unknown chip version number.

ERROR_ARGUS_UNKNOWN_LASER 

-197: AFBR-S50 Error: Unknown laser type number.

STATUS_ARGUS_BUSY_TEST 

191: AFBR-S50 Status (internal): The device is currently busy with testing the SPI connection to the device.

STATUS_ARGUS_BUSY_UPDATE 

192: AFBR-S50 Status (internal): The device is currently busy with updating the settings parameter (i.e. with writing register values).

STATUS_ARGUS_BUSY_CAL_SEQ 

195: AFBR-S50 Status (internal): The device is currently executing a calibration sequence.

STATUS_ARGUS_BUSY_MEAS 

196: AFBR-S50 Status (internal): The device is currently executing a measurement cycle.

STATUS_ARGUS_STARTING 

100: AFBR-S50 Status (internal): The ASIC is initializing a new measurement, i.e. a register value is written that starts an integration cycle on the ASIC.

STATUS_ARGUS_ACTIVE 

103: AFBR-S50 Status (internal): The ASIC is performing an integration cycle.