|
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... | |
Module to configure sensor and processing.
typedef struct acc_config acc_config_t |
Definition at line 26 of file acc_config.h.
bool acc_config_continuous_sweep_mode_get | ( | const acc_config_t * | config | ) |
Get continuous sweep mode.
See acc_config_continuous_sweep_mode_set
[in] | config | The configuration |
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:
[in] | config | The configuration |
[in] | enabled | true if continuous sweep mode should be enabled, false otherwise |
acc_config_t* acc_config_create | ( | void | ) |
Create a configuration.
A configuration is created and populated with default values.
void acc_config_destroy | ( | acc_config_t * | config | ) |
Destroy a configuration freeing any resources allocated.
Destroy a configuration that is no longer needed.
[in] | config | The configuration to destroy, can be NULL |
bool acc_config_double_buffering_get | ( | const acc_config_t * | config | ) |
Get the double buffering configuration.
See acc_config_double_buffering_set
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | enable | true if double buffering should be enabled, false otherwise |
bool acc_config_enable_loopback_get | ( | const acc_config_t * | config | ) |
Get the enable loopback configuration.
See acc_config_enable_loopback_set
[in] | config | The configuration |
void acc_config_enable_loopback_set | ( | acc_config_t * | config, |
bool | enable | ||
) |
Enable or disable loopback.
Constraints:
[in] | config | The configuration |
[in] | enable | true if loopback should be enabled, false otherwise |
bool acc_config_enable_tx_get | ( | const acc_config_t * | config | ) |
Get transmitter enable configuration.
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | enable | true to enable the transmitter, false to disable it |
float acc_config_frame_rate_get | ( | const acc_config_t * | config | ) |
Get the frame rate.
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | frame_rate | Frame rate in Hz. Must be >= 0, 0 is interpreted as unlimited |
uint16_t acc_config_hwaas_get | ( | const acc_config_t * | config | ) |
Get the hardware accelerated average samples (HWAAS)
[in] | config | The config to get HWAAS from |
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
[in] | config | The config to set HWAAS for |
[in] | hwaas | Hardware accelerated average samples |
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
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | idle_state | The idle state to use between frames |
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
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | idle_state | The idle state to use between sweeps within a frame |
void acc_config_log | ( | const acc_config_t * | config | ) |
Print a configuration to the log.
[in] | config | The configuration to log |
uint16_t acc_config_num_points_get | ( | const acc_config_t * | config | ) |
Get the number of data points to measure.
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | num_points | Number of data points to measure |
bool acc_config_phase_enhancement_get | ( | const acc_config_t * | config | ) |
Get the phase enhancement configuration.
See acc_config_phase_enhancement_set
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | enable | true if phase enhancement should be enabled, false otherwise |
acc_config_prf_t acc_config_prf_get | ( | const acc_config_t * | config | ) |
Get Pulse Repetition Frequency.
See acc_config_prf_t for details.
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | prf | The Pulse Repetition Frequency to use |
acc_config_profile_t acc_config_profile_get | ( | const acc_config_t * | config | ) |
Get the currently used profile.
[in] | config | The config to get a profile for |
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.
[in] | config | The config to set a profile for |
[in] | profile | The profile to set |
uint8_t acc_config_receiver_gain_get | ( | const acc_config_t * | config | ) |
Get receiver gain setting.
See acc_config_receiver_gain_set
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | gain | Receiver gain setting |
int32_t acc_config_start_point_get | ( | const acc_config_t * | config | ) |
Get the starting point of the sweep.
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | start_point | The starting point of the sweep |
uint16_t acc_config_step_length_get | ( | const acc_config_t * | config | ) |
Get the step length in a sweep.
[in] | config | The configuration |
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.
The step length has the following constraints: if step_length <= 24: 24 % step_length == 0
if step_length > 24: step_length % 24 == 0
This leads to the following valid values: 1, 2, 3, 4, 6, 8, 12, 24, 48, 72 ...
[in] | config | The configuration |
[in] | step_length | The step length |
float acc_config_sweep_rate_get | ( | const acc_config_t * | config | ) |
Get the sweep rate.
[in] | config | The configuration |
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).
[in] | config | The configuration |
[in] | sweep_rate | Sweep rate in Hz. Must be >= 0, 0 is interpreted as max sweep rate |
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
[in] | config | The configuration |
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.
[in] | config | The configuration |
[in] | sweeps | Sweeps per frame |