iNEMO inertial module: 3D accelerometer and 3D gyroscope.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3

Embed: (wiki syntax)

« Back to documentation index

LSM6DSO_filters

LSM6DSO_filters
[LSM6DSO]

This section group all the functions concerning the filters configuration. More...

Functions

int32_t lsm6dso_xl_filter_lp2_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Accelerometer output from LPF2 filtering stage selection.
int32_t lsm6dso_xl_filter_lp2_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Accelerometer output from LPF2 filtering stage selection.
int32_t lsm6dso_gy_filter_lp1_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Enables gyroscope digital LPF1 if auxiliary SPI is disabled; the bandwidth can be selected through FTYPE [2:0] in CTRL6_C (15h).
int32_t lsm6dso_gy_filter_lp1_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Enables gyroscope digital LPF1 if auxiliary SPI is disabled; the bandwidth can be selected through FTYPE [2:0] in CTRL6_C (15h).
int32_t lsm6dso_filter_settling_mask_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Mask DRDY on pin (both XL & Gyro) until filter settling ends (XL and Gyro independently masked).
int32_t lsm6dso_filter_settling_mask_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Mask DRDY on pin (both XL & Gyro) until filter settling ends (XL and Gyro independently masked).
int32_t lsm6dso_gy_lp1_bandwidth_set (lsm6dso_ctx_t *ctx, lsm6dso_ftype_t val)
 Gyroscope lp1 bandwidth.
int32_t lsm6dso_gy_lp1_bandwidth_get (lsm6dso_ctx_t *ctx, lsm6dso_ftype_t *val)
 Gyroscope lp1 bandwidth.
int32_t lsm6dso_xl_lp2_on_6d_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Low pass filter 2 on 6D function selection.
int32_t lsm6dso_xl_lp2_on_6d_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Low pass filter 2 on 6D function selection.
int32_t lsm6dso_xl_hp_path_on_out_set (lsm6dso_ctx_t *ctx, lsm6dso_hp_slope_xl_en_t val)
 Accelerometer slope filter / high-pass filter selection on output.
int32_t lsm6dso_xl_hp_path_on_out_get (lsm6dso_ctx_t *ctx, lsm6dso_hp_slope_xl_en_t *val)
 Accelerometer slope filter / high-pass filter selection on output.
int32_t lsm6dso_xl_fast_settling_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Enables accelerometer LPF2 and HPF fast-settling mode.
int32_t lsm6dso_xl_fast_settling_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Enables accelerometer LPF2 and HPF fast-settling mode.
int32_t lsm6dso_xl_hp_path_internal_set (lsm6dso_ctx_t *ctx, lsm6dso_slope_fds_t val)
 HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions.
int32_t lsm6dso_xl_hp_path_internal_get (lsm6dso_ctx_t *ctx, lsm6dso_slope_fds_t *val)
 HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions.
int32_t lsm6dso_gy_hp_path_internal_set (lsm6dso_ctx_t *ctx, lsm6dso_hpm_g_t val)
 Enables gyroscope digital high-pass filter.
int32_t lsm6dso_gy_hp_path_internal_get (lsm6dso_ctx_t *ctx, lsm6dso_hpm_g_t *val)
 Enables gyroscope digital high-pass filter.

Detailed Description

This section group all the functions concerning the filters configuration.


Function Documentation

int32_t lsm6dso_filter_settling_mask_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Mask DRDY on pin (both XL & Gyro) until filter settling ends (XL and Gyro independently masked).

[get]

Parameters:
ctxread / write interface definitions
valchange the values of drdy_mask in reg CTRL4_C

Definition at line 1980 of file lsm6dso_reg.c.

int32_t lsm6dso_filter_settling_mask_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Mask DRDY on pin (both XL & Gyro) until filter settling ends (XL and Gyro independently masked).

[set]

Parameters:
ctxread / write interface definitions
valchange the values of drdy_mask in reg CTRL4_C

Definition at line 1959 of file lsm6dso_reg.c.

int32_t lsm6dso_gy_filter_lp1_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Enables gyroscope digital LPF1 if auxiliary SPI is disabled; the bandwidth can be selected through FTYPE [2:0] in CTRL6_C (15h).

[get]

Parameters:
ctxread / write interface definitions
valchange the values of lpf1_sel_g in reg CTRL4_C

Definition at line 1940 of file lsm6dso_reg.c.

int32_t lsm6dso_gy_filter_lp1_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Enables gyroscope digital LPF1 if auxiliary SPI is disabled; the bandwidth can be selected through FTYPE [2:0] in CTRL6_C (15h).

[set]

Parameters:
ctxread / write interface definitions
valchange the values of lpf1_sel_g in reg CTRL4_C

Definition at line 1918 of file lsm6dso_reg.c.

int32_t lsm6dso_gy_hp_path_internal_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_hpm_g_t *  val 
)

Enables gyroscope digital high-pass filter.

The filter is enabled only if the gyro is in HP mode.[get]

Parameters:
ctxread / write interface definitions
valGet the values of hp_en_g and hp_en_g in reg CTRL7_G

Definition at line 2341 of file lsm6dso_reg.c.

int32_t lsm6dso_gy_hp_path_internal_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_hpm_g_t  val 
)

Enables gyroscope digital high-pass filter.

The filter is enabled only if the gyro is in HP mode.[set]

Parameters:
ctxread / write interface definitions
valGet the values of hp_en_g and hp_en_g in reg CTRL7_G

Definition at line 2317 of file lsm6dso_reg.c.

int32_t lsm6dso_gy_lp1_bandwidth_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ftype_t *  val 
)

Gyroscope lp1 bandwidth.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of ftype in reg CTRL6_C

Definition at line 2018 of file lsm6dso_reg.c.

int32_t lsm6dso_gy_lp1_bandwidth_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_ftype_t  val 
)

Gyroscope lp1 bandwidth.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of ftype in reg CTRL6_C

Definition at line 1998 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_fast_settling_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Enables accelerometer LPF2 and HPF fast-settling mode.

The filter sets the second samples after writing this bit. Active only during device exit from power-down mode.[get]

Parameters:
ctxread / write interface definitions
valchange the values of fastsettl_mode_xl in reg CTRL8_XL

Definition at line 2246 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_fast_settling_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Enables accelerometer LPF2 and HPF fast-settling mode.

The filter sets the second samples after writing this bit. Active only during device exit from power-down mode.[set]

Parameters:
ctxread / write interface definitions
valchange the values of fastsettl_mode_xl in reg CTRL8_XL

Definition at line 2224 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_filter_lp2_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Accelerometer output from LPF2 filtering stage selection.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of lpf2_xl_en in reg CTRL1_XL

Definition at line 1898 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_filter_lp2_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Accelerometer output from LPF2 filtering stage selection.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of lpf2_xl_en in reg CTRL1_XL

Definition at line 1878 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_hp_path_internal_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_slope_fds_t *  val 
)

HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of slope_fds in reg TAP_CFG0

Definition at line 2287 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_hp_path_internal_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_slope_fds_t  val 
)

HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of slope_fds in reg TAP_CFG0

Definition at line 2265 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_hp_path_on_out_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_hp_slope_xl_en_t *  val 
)

Accelerometer slope filter / high-pass filter selection on output.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of hp_slope_xl_en in reg CTRL8_XL

Definition at line 2128 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_hp_path_on_out_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_hp_slope_xl_en_t  val 
)

Accelerometer slope filter / high-pass filter selection on output.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of hp_slope_xl_en in reg CTRL8_XL

Definition at line 2103 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_lp2_on_6d_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Low pass filter 2 on 6D function selection.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of low_pass_on_6d in reg CTRL8_XL

Definition at line 2083 of file lsm6dso_reg.c.

int32_t lsm6dso_xl_lp2_on_6d_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Low pass filter 2 on 6D function selection.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of low_pass_on_6d in reg CTRL8_XL

Definition at line 2063 of file lsm6dso_reg.c.