Modules | Typedefs | Functions
Config
Service

Module to configure sensor and processing. More...

## Modules
| Subsweep
| Module to configure subsweeps.

## Typedefs
typedef struct acc_config | acc_config_t

## Functions
acc_config_t * | acc_config_create (void)
| Create a configuration. More...
void | acc_config_destroy (acc_config_t *config)
| Destroy a configuration freeing any resources allocated. More...
void | acc_config_log (const acc_config_t *config)
| Print a configuration to the log. More...
void | acc_config_start_point_set (acc_config_t *config, int32_t start_point)
| Set the starting point of the sweep. More...
int32_t | acc_config_start_point_get (const acc_config_t *config)
| Get the starting point of the sweep. More...
void | acc_config_num_points_set (acc_config_t *config, uint16_t num_points)
| Set the number of data points to measure. More...
uint16_t | acc_config_num_points_get (const acc_config_t *config)
| Get the number of data points to measure. More...
void | acc_config_step_length_set (acc_config_t *config, uint16_t step_length)
| Set the step length in a sweep. More...
uint16_t | acc_config_step_length_get (const acc_config_t *config)
| Get the step length in a sweep. More...
void | acc_config_profile_set (acc_config_t *config, acc_config_profile_t profile)
| Set a profile. More...
acc_config_profile_t | acc_config_profile_get (const acc_config_t *config)
| Get the currently used profile. More...
void | acc_config_hwaas_set (acc_config_t *config, uint16_t hwaas)
| Set the hardware accelerated average samples (HWAAS) More...
uint16_t | acc_config_hwaas_get (const acc_config_t *config)
| Get the hardware accelerated average samples (HWAAS) More...
void | acc_config_receiver_gain_set (acc_config_t *config, uint8_t gain)
| Set receiver gain setting. More...
uint8_t | acc_config_receiver_gain_get (const acc_config_t *config)
| Get receiver gain setting. More...
void | acc_config_sweeps_per_frame_set (acc_config_t *config, uint16_t sweeps)
| Set sweeps per frame. More...
uint16_t | acc_config_sweeps_per_frame_get (const acc_config_t *config)
| Get the number of sweeps per frame. More...
void | acc_config_sweep_rate_set (acc_config_t *config, float sweep_rate)
| Set the sweep rate. More...
float | acc_config_sweep_rate_get (const acc_config_t *config)
| Get the sweep rate. More...
void | acc_config_continuous_sweep_mode_set (acc_config_t *config, bool enabled)
| Set continuous sweep mode. More...
bool | acc_config_continuous_sweep_mode_get (const acc_config_t *config)
| Get continuous sweep mode. More...
void | acc_config_frame_rate_set (acc_config_t *config, float frame_rate)
| Set the frame rate. More...
float | acc_config_frame_rate_get (const acc_config_t *config)
| Get the frame rate. More...
void | acc_config_enable_tx_set (acc_config_t *config, bool enable)
| Enable or disable the transmitter. More...
bool | acc_config_enable_tx_get (const acc_config_t *config)
| Get transmitter enable configuration. More...
void | acc_config_inter_frame_idle_state_set (acc_config_t *config, acc_config_idle_state_t idle_state)
| Set inter frame idle state. More...
acc_config_idle_state_t | acc_config_inter_frame_idle_state_get (const acc_config_t *config)
| Get inter frame idle state. More...
void | acc_config_inter_sweep_idle_state_set (acc_config_t *config, acc_config_idle_state_t idle_state)
| Set inter sweep idle state. More...
acc_config_idle_state_t | acc_config_inter_sweep_idle_state_get (const acc_config_t *config)
| Get inter sweep idle state. More...
void | acc_config_prf_set (acc_config_t *config, acc_config_prf_t prf)
| Set Pulse Repetition Frequency. More...
acc_config_prf_t | acc_config_prf_get (const acc_config_t *config)
| Get Pulse Repetition Frequency. More...
void | acc_config_phase_enhancement_set (acc_config_t *config, bool enable)
| Enable or disable phase enhancement. More...
bool | acc_config_phase_enhancement_get (const acc_config_t *config)
| Get the phase enhancement configuration. More...
void | acc_config_enable_loopback_set (acc_config_t *config, bool enable)
| Enable or disable loopback. More...
bool | acc_config_enable_loopback_get (const acc_config_t *config)
| Get the enable loopback configuration. More...
void | acc_config_double_buffering_set (acc_config_t *config, bool enable)
| Enable or disable double buffering. More...
bool | acc_config_double_buffering_get (const acc_config_t *config)
| Get the double buffering configuration. More...

## Detailed Description

Module to configure sensor and processing.

## Typedef Documentation

## ◆ acc_config_t

typedef struct acc_config acc_config_t

Definition at line 26 of file acc_config.h.

## Function Documentation

## ◆ acc_config_continuous_sweep_mode_get()

bool acc_config_continuous_sweep_mode_get | ( | const acc_config_t * | config | ) |

Get continuous sweep mode.

See acc_config_continuous_sweep_mode_set

Parameters

  [in] | config | The configuration

Returns
  true if continuous sweep mode is enabled, false otherwise

## ◆ acc_config_continuous_sweep_mode_set()

void acc_config_continuous_sweep_mode_set | ( | acc_config_t * | config,
|  | bool | enabled
| ) |  |

Set continuous sweep mode.

In continuous sweep mode the timing will be identical over all sweeps, not just the sweeps in a frame.

Constraints:

- Frame rate must be set to unlimited (0.0)
- Sweep rate must be set (> 0)
- Inter frame idle state must be set equal to inter sweep idle state

Parameters

  [in] | config | The configuration
  [in] | enabled | true if continuous sweep mode should be enabled, false otherwise

## ◆ acc_config_create()

acc_config_t* acc_config_create | ( | void |  | ) |

Create a configuration.

A configuration is created and populated with default values.

Returns
  A configuration instance

Examples
  acc_control_helper.c, example_service.c, example_service_low_power_sensor_disable.c, example_service_low_power_sensor_hibernate.c, example_service_multiple_configurations.c, example_service_sensor_disable.c, example_service_sensor_hibernate.c, example_service_sensor_off.c, and example_service_subsweeps.c.

## ◆ acc_config_destroy()

void acc_config_destroy | ( | acc_config_t * | config | ) |

Destroy a configuration freeing any resources allocated.

Destroy a configuration that is no longer needed.

Parameters

  [in] | config | The configuration to destroy, can be NULL

Examples
  acc_control_helper.c, example_service.c, example_service_low_power_sensor_disable.c, example_service_low_power_sensor_hibernate.c, example_service_multiple_configurations.c, example_service_sensor_disable.c, example_service_sensor_hibernate.c, example_service_sensor_off.c, and example_service_subsweeps.c.

## ◆ acc_config_double_buffering_get()

bool acc_config_double_buffering_get | ( | const acc_config_t * | config | ) |

Get the double buffering configuration.

See acc_config_double_buffering_set

Parameters

  [in] | config | The configuration

Returns
  true if double buffering is enabled, false otherwise

## ◆ acc_config_double_buffering_set()

void acc_config_double_buffering_set | ( | acc_config_t * | config,
|  | bool | enable
| ) |  |

Enable or disable double buffering.

If enabled, the sensor buffer will be split in two halves reducing the maximum number of samples. A frame can be read using acc_sensor_read while sampling is done into the other buffer. Switching of buffers is done automatically by acc_sensor_measure.

When using double buffering, measurements coinciding with SPI activity may have distorted phase. To mitigate this issue, applying a median filter is recommended.

Parameters

  [in] | config | The configuration
  [in] | enable | true if double buffering should be enabled, false otherwise

## ◆ acc_config_enable_loopback_get()

bool acc_config_enable_loopback_get | ( | const acc_config_t * | config | ) |

Get the enable loopback configuration.

See acc_config_enable_loopback_set

Parameters

  [in] | config | The configuration

Returns
  true if loopback is enabled, false otherwise

## ◆ acc_config_enable_loopback_set()

void acc_config_enable_loopback_set | ( | acc_config_t * | config,
|  | bool | enable
| ) |  |

Enable or disable loopback.

Constraints:

- Loopback can't be enabled together with profile 2.

Parameters

  [in] | config | The configuration
  [in] | enable | true if loopback should be enabled, false otherwise

## ◆ acc_config_enable_tx_get()

bool acc_config_enable_tx_get | ( | const acc_config_t * | config | ) |

Get transmitter enable configuration.

See acc_config_enable_tx_set

Parameters

  [in] | config | The configuration

Returns
  true if the transmitter is enabled, false if it is disabled

## ◆ acc_config_enable_tx_set()

void acc_config_enable_tx_set | ( | acc_config_t * | config,
|  | bool | enable
| ) |  |

Enable or disable the transmitter.

If set to true, TX is enabled. This will enable the radio transmitter. By turning the transmitter off the RX noise floor can be measured.

Parameters

  [in] | config | The configuration
  [in] | enable | true to enable the transmitter, false to disable it

## ◆ acc_config_frame_rate_get()

float acc_config_frame_rate_get | ( | const acc_config_t * | config | ) |

Get the frame rate.

See acc_config_frame_rate_set

Parameters

  [in] | config | The configuration

Returns
  Frame rate

Examples
  example_processing_subtract_adaptive_bg.c.

## ◆ acc_config_frame_rate_set()

void acc_config_frame_rate_set | ( | acc_config_t * | config,
|  | float | frame_rate
| ) |  |

Set the frame rate.

Sets the frame rate.

Setting the frame rate to unlimited (0) means that the rate is not limited by the sensor but the rate that the host acknowledge and reads out the measurement data.

Parameters

  [in] | config | The configuration
  [in] | frame_rate | Frame rate in Hz. Must be >= 0, 0 is interpreted as unlimited

Examples
  example_processing_peak_interpolation.c, and example_processing_subtract_adaptive_bg.c.

## ◆ acc_config_hwaas_get()

uint16_t acc_config_hwaas_get | ( | const acc_config_t * | config | ) |

Get the hardware accelerated average samples (HWAAS)

See also
  acc_config_hwaas_set

Parameters

  [in] | config | The config to get HWAAS from

Returns
  Hardware accelerated average samples

## ◆ acc_config_hwaas_set()

void acc_config_hwaas_set | ( | acc_config_t * | config,
|  | uint16_t | hwaas
| ) |  |

Set the hardware accelerated average samples (HWAAS)

Each data point can be sampled several times and the sensor hardware then produces an average value of those samples. The time needed to measure a sweep is roughly proportional to the number of averaged samples. Hence, if there is a need to obtain a higher update rate, HWAAS could be decreased but this leads to lower SNR.

HWAAS must be between 1 and 511 inclusive

Parameters

  [in] | config | The config to set HWAAS for
  [in] | hwaas | Hardware accelerated average samples

Examples
  example_processing_amplitude.c, example_processing_coherent_mean.c, example_processing_noncoherent_mean.c, example_processing_peak_interpolation.c, example_processing_static_presence.c, and example_processing_subtract_adaptive_bg.c.

## ◆ acc_config_inter_frame_idle_state_get()

acc_config_idle_state_t acc_config_inter_frame_idle_state_get | ( | const acc_config_t * | config | ) |

Get inter frame idle state.

See acc_config_inter_frame_idle_state_set

Parameters

  [in] | config | The configuration

Returns
  The idle state to use between frames

## ◆ acc_config_inter_frame_idle_state_set()

void acc_config_inter_frame_idle_state_set | ( | acc_config_t * | config,
|  | acc_config_idle_state_t | idle_state
| ) |  |

Set inter frame idle state.

The 'inter-frame idle state' is the state the sensor idles in between each frame.

See also acc_config_idle_state_t.

The inter frame idle state of the frame must be deeper or the same as the inter sweep idle state.

Parameters

  [in] | config | The configuration
  [in] | idle_state | The idle state to use between frames

## ◆ acc_config_inter_sweep_idle_state_get()

acc_config_idle_state_t acc_config_inter_sweep_idle_state_get | ( | const acc_config_t * | config | ) |

Get inter sweep idle state.

See acc_config_inter_sweep_idle_state_set

Parameters

  [in] | config | The configuration

Returns
  The idle state to use between sweeps within a frame

## ◆ acc_config_inter_sweep_idle_state_set()

void acc_config_inter_sweep_idle_state_set | ( | acc_config_t * | config,
|  | acc_config_idle_state_t | idle_state
| ) |  |

Set inter sweep idle state.

The 'inter-sweep idle state' is the state the sensor idles in between each sweep in a frame.

See also acc_config_idle_state_t.

Parameters

  [in] | config | The configuration
  [in] | idle_state | The idle state to use between sweeps within a frame

## ◆ acc_config_log()

void acc_config_log | ( | const acc_config_t * | config | ) |

Print a configuration to the log.

Parameters

  [in] | config | The configuration to log

Examples
  example_service.c, and example_service_subsweeps.c.

## ◆ acc_config_num_points_get()

uint16_t acc_config_num_points_get | ( | const acc_config_t * | config | ) |

Get the number of data points to measure.

See also
  acc_config_num_points_set

Parameters

  [in] | config | The configuration

Returns
  Number of data points to measure

## ◆ acc_config_num_points_set()

void acc_config_num_points_set | ( | acc_config_t * | config,
|  | uint16_t | num_points
| ) |  |

Set the number of data points to measure.

This sets the number of data points to measure in a sweep.

Parameters

  [in] | config | The configuration
  [in] | num_points | Number of data points to measure

Examples
  example_processing_amplitude.c, example_processing_coherent_mean.c, example_processing_noncoherent_mean.c, example_processing_peak_interpolation.c, example_processing_static_presence.c, example_processing_subtract_adaptive_bg.c, example_service.c, example_service_low_power_sensor_disable.c, example_service_low_power_sensor_hibernate.c, example_service_multiple_configurations.c, example_service_sensor_disable.c, example_service_sensor_hibernate.c, and example_service_sensor_off.c.

## ◆ acc_config_phase_enhancement_get()

bool acc_config_phase_enhancement_get | ( | const acc_config_t * | config | ) |

Get the phase enhancement configuration.

See acc_config_phase_enhancement_set

Parameters

  [in] | config | The configuration

Returns
  true if phase enhancement is enabled, false otherwise

## ◆ acc_config_phase_enhancement_set()

void acc_config_phase_enhancement_set | ( | acc_config_t * | config,
|  | bool | enable
| ) |  |

Enable or disable phase enhancement.

If enabled, the data phase will be enhanced such that coherent distance filtering can be applied. Given a single reflection from an object, the phase will appear as "flat" around the amplitude peak.

Enabling the phase enhancement increases the processing execution time.

Parameters

  [in] | config | The configuration
  [in] | enable | true if phase enhancement should be enabled, false otherwise

Examples
  example_processing_peak_interpolation.c.

## ◆ acc_config_prf_get()

acc_config_prf_t acc_config_prf_get | ( | const acc_config_t * | config | ) |

Get Pulse Repetition Frequency.

See acc_config_prf_t for details.

Parameters

  [in] | config | The configuration

Returns
  Pulse Repetition Frequency

## ◆ acc_config_prf_set()

void acc_config_prf_set | ( | acc_config_t * | config,
|  | acc_config_prf_t | prf
| ) |  |

Set Pulse Repetition Frequency.

See acc_config_prf_t for details.

Parameters

  [in] | config | The configuration
  [in] | prf | The Pulse Repetition Frequency to use

Examples
  example_processing_amplitude.c, example_processing_coherent_mean.c, example_processing_noncoherent_mean.c, example_processing_peak_interpolation.c, example_processing_static_presence.c, and example_processing_subtract_adaptive_bg.c.

## ◆ acc_config_profile_get()

acc_config_profile_t acc_config_profile_get | ( | const acc_config_t * | config | ) |

Get the currently used profile.

See acc_config_profile_set

Parameters

  [in] | config | The config to get a profile for

Returns
  The profile currently used

## ◆ acc_config_profile_set()

void acc_config_profile_set | ( | acc_config_t * | config,
|  | acc_config_profile_t | profile
| ) |  |

Set a profile.

Each profile consists of a number of settings for the sensor that configures the RX and TX paths. Lower profiles have higher depth resolution while higher profiles have higher SNR.

Parameters

  [in] | config | The config to set a profile for
  [in] | profile | The profile to set

Examples
  example_processing_amplitude.c, example_processing_coherent_mean.c, example_processing_noncoherent_mean.c, example_processing_peak_interpolation.c, example_processing_static_presence.c, and example_processing_subtract_adaptive_bg.c.

## ◆ acc_config_receiver_gain_get()

uint8_t acc_config_receiver_gain_get | ( | const acc_config_t * | config | ) |

Get receiver gain setting.

See acc_config_receiver_gain_set

Parameters

  [in] | config | The configuration

Returns
  Receiver gain setting

## ◆ acc_config_receiver_gain_set()

void acc_config_receiver_gain_set | ( | acc_config_t * | config,
|  | uint8_t | gain
| ) |  |

Set receiver gain setting.

Must be a value between 0 and 23 inclusive where 23 is the highest gain and 0 the lowest.

Lower gain gives higher SNR. However, too low gain may result in quantization, lowering SNR. Too high gain may result in saturation, corrupting the data.

Parameters

  [in] | config | The configuration
  [in] | gain | Receiver gain setting

## ◆ acc_config_start_point_get()

int32_t acc_config_start_point_get | ( | const acc_config_t * | config | ) |

Get the starting point of the sweep.

See also
  acc_config_start_point_set

Parameters

  [in] | config | The configuration

Returns
  The starting point of the sweep

Examples
  example_processing_peak_interpolation.c.

## ◆ acc_config_start_point_set()

void acc_config_start_point_set | ( | acc_config_t * | config,
|  | int32_t | start_point
| ) |  |

Set the starting point of the sweep.

This sets the starting point of the sweep. The corresponding start in millimeter is approximately start_point * 2.5 mm. For the exact distance in meter, use the acc_processing_points_to_meter function.

Parameters

  [in] | config | The configuration
  [in] | start_point | The starting point of the sweep

Examples
  example_control_helper.c, example_processing_amplitude.c, example_processing_coherent_mean.c, example_processing_noncoherent_mean.c, example_processing_peak_interpolation.c, example_processing_static_presence.c, example_processing_subtract_adaptive_bg.c, example_service.c, example_service_low_power_sensor_disable.c, example_service_low_power_sensor_hibernate.c, example_service_multiple_configurations.c, example_service_sensor_disable.c, example_service_sensor_hibernate.c, and example_service_sensor_off.c.

## ◆ acc_config_step_length_get()

uint16_t acc_config_step_length_get | ( | const acc_config_t * | config | ) |

Get the step length in a sweep.

See also
  acc_config_step_length_set

Parameters

  [in] | config | The configuration

Returns
  The step length

Examples
  example_processing_peak_interpolation.c.

## ◆ acc_config_step_length_set()

void acc_config_step_length_set | ( | acc_config_t * | config,
|  | uint16_t | step_length
| ) |  |

Set the step length in a sweep.

This sets the number of steps to have between each data point.

Sampling produces complex (IQ) data points with configurable distance spacing, starting from ~2.5mm.

Parameters

  [in] | config | The configuration
  [in] | step_length | The step length

Examples
  example_processing_amplitude.c, example_processing_coherent_mean.c, example_processing_noncoherent_mean.c, example_processing_peak_interpolation.c, example_processing_static_presence.c, and example_processing_subtract_adaptive_bg.c.

## ◆ acc_config_sweep_rate_get()

float acc_config_sweep_rate_get | ( | const acc_config_t * | config | ) |

Get the sweep rate.

See acc_config_sweep_rate_set

Parameters

  [in] | config | The configuration

Returns
  Sweep rate in Hz

## ◆ acc_config_sweep_rate_set()

void acc_config_sweep_rate_set | ( | acc_config_t * | config,
|  | float | sweep_rate
| ) |  |

Set the sweep rate.

Sets the sweep rate for sweeps in a frame (measurement).

Parameters

  [in] | config | The configuration
  [in] | sweep_rate | Sweep rate in Hz. Must be >= 0, 0 is interpreted as max sweep rate

## ◆ acc_config_sweeps_per_frame_get()

uint16_t acc_config_sweeps_per_frame_get | ( | const acc_config_t * | config | ) |

Get the number of sweeps per frame.

See acc_config_sweeps_per_frame_set

Parameters

  [in] | config | The configuration

Returns
  Sweeps per frame

Examples
  example_detector_distance_with_iq_data_print.c.

## ◆ acc_config_sweeps_per_frame_set()

void acc_config_sweeps_per_frame_set | ( | acc_config_t * | config,
|  | uint16_t | sweeps
| ) |  |

Set sweeps per frame.

Sets the number of sweeps that will be captured in each frame (measurement). Can be set to 0 if e.g. only temperature measurement is wanted.

Parameters

  [in] | config | The configuration
  [in] | sweeps | Sweeps per frame

Examples
  example_processing_amplitude.c, example_processing_coherent_mean.c, example_processing_noncoherent_mean.c, example_processing_peak_interpolation.c, example_processing_static_presence.c, example_processing_subtract_adaptive_bg.c, example_service_multiple_configurations.c, and example_service_subsweeps.c.