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

A CLI module to print debugging information on frame basis. More...

Collaboration diagram for Debugging CLI:

Macros

#define SEP   ARGUS_DEBUG_COLUMN_SEPARATOR
 
#define ARGUS_DEBUG_CLI_VERSION   "v1.0"
 Version number of the debug information via CLI.
 
#define ARGUS_DEBUG_COLUMN_SEPARATOR   ";"
 The column separator for the debug print functionality. Examples: ";", ",", " ", "\t".
 

Functions

void Print_DebugHeader (void)
 Prints debugging measurement header via UART.
 
void Print_DebugResults (uint32_t frame_cnt, argus_results_t const *res)
 Prints debugging measurement results via UART.
 

Detailed Description

A CLI module to print debugging information on frame basis.



Just replace your data handling function by this print function to stream debugging measurement data via UART to a terminal.

Macro Definition Documentation

◆ ARGUS_DEBUG_CLI_VERSION

#define ARGUS_DEBUG_CLI_VERSION   "v1.0"

Version number of the debug information via CLI.


Changes:

  • v1.0:
    • Initial release.

◆ ARGUS_DEBUG_COLUMN_SEPARATOR

#define ARGUS_DEBUG_COLUMN_SEPARATOR   ";"

The column separator for the debug print functionality. Examples: ";", ",", " ", "\t".


◆ SEP

#define SEP   ARGUS_DEBUG_COLUMN_SEPARATOR

Just a shortcut for better code readability

Function Documentation

◆ Print_DebugHeader()

void Print_DebugHeader ( void  )

Prints debugging measurement header via UART.


Note
It is suggested to increase the UART baud rate to a sufficient large value (e.g. 2 Mbps) to avoid slow down of measurement rate due to a UART bottleneck.

Prints an formatted header for the extended measurement data via UART. The measurement data is printed via Print_DebugResults function. Calling this function before printing any error creates the according (and optional) header.

The data stream consists of four parts:

  1. Frame & binned data
  2. Single pixel data (incl. sat pixel count)
  3. Integration parameters
  4. Auxiliary data
See also
Print_DebugResults
Examples
05_simple_example_debug.c.

◆ Print_DebugResults()

void Print_DebugResults ( uint32_t  frame_cnt,
argus_results_t const *  res 
)

Prints debugging measurement results via UART.


Note
It is suggested to increase the UART baud rate to a sufficient large value (e.g. 2 Mbps) to avoid slow down of measurement rate due to a UART bottleneck.

Prints a formatted string of measurement and debug data in table format via UART. Each call to this function will send a line of separated data via UART. The default separator is ; but can be changed via the ARGUS_DEBUG_COLUMN_SEPARATOR definition.

Note that this uses the debug data structure! So it requires the res->Debug pointer to be set which is done by using the Argus_EvaluateDataDebug method instead of the Argus_EvaluateData method!

The data stream consists of four parts:

  1. Frame & binned data
  2. Single pixel data (incl. sat pixel count)
  3. Integration data
  4. Auxiliary data

In detail:

  1. Frame number; timestamp; binned range in mm; binned amplitude in LSB; frame status;
  2. Range pixel(0/0); Amplitude pixel(0/0); Status pixel(0/0); ... ...Range pixel(7/3); Amplitude pixel(7/3); Status pixel(7/3); saturated pixel count of frame;
  3. Analog integration in LSB; Digital integration; LaserCurrent in mA; pixel gain in LSB;
  4. Auxiliary task: APD current; Shot noise amplitude, ASIC temperature; VDD, VDDL, Substrate voltage

Use the Print_DebugHeader function to output an proper header for the debug data table.

See also
Print_DebugHeader
Parameters
frame_cntAn integer to print the frame number; this should be incremented by one each time the function is called.
resThe pointer to the measurement results structure to be printed. Note that the res->Debug pointer must be set for this to work properly!
Examples
05_simple_example_debug.c.