STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
ISM330DHCX_filters

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

Collaboration diagram for ISM330DHCX_filters:

Functions

int32_t ism330dhcx_xl_filter_lp2_set (stmdev_ctx_t *ctx, uint8_t val)
 Accelerometer output from LPF2 filtering stage selection.
int32_t ism330dhcx_xl_filter_lp2_get (stmdev_ctx_t *ctx, uint8_t *val)
 Accelerometer output from LPF2 filtering stage selection.
int32_t ism330dhcx_gy_filter_lp1_set (stmdev_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.
int32_t ism330dhcx_gy_filter_lp1_get (stmdev_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.
int32_t ism330dhcx_filter_settling_mask_set (stmdev_ctx_t *ctx, uint8_t val)
 Mask DRDY on pin (both XL & Gyro) until filter settling ends (XL and Gyro independently masked).
int32_t ism330dhcx_filter_settling_mask_get (stmdev_ctx_t *ctx, uint8_t *val)
 Mask DRDY on pin (both XL & Gyro) until filter settling ends (XL and Gyro independently masked).
int32_t ism330dhcx_gy_lp1_bandwidth_set (stmdev_ctx_t *ctx, ism330dhcx_ftype_t val)
 Gyroscope low pass filter 1 bandwidth.
int32_t ism330dhcx_gy_lp1_bandwidth_get (stmdev_ctx_t *ctx, ism330dhcx_ftype_t *val)
 Gyroscope low pass filter 1 bandwidth.
int32_t ism330dhcx_xl_lp2_on_6d_set (stmdev_ctx_t *ctx, uint8_t val)
 Low pass filter 2 on 6D function selection.
int32_t ism330dhcx_xl_lp2_on_6d_get (stmdev_ctx_t *ctx, uint8_t *val)
 Low pass filter 2 on 6D function selection.
int32_t ism330dhcx_xl_hp_path_on_out_set (stmdev_ctx_t *ctx, ism330dhcx_hp_slope_xl_en_t val)
 Accelerometer slope filter / high-pass filter selection on output.
int32_t ism330dhcx_xl_hp_path_on_out_get (stmdev_ctx_t *ctx, ism330dhcx_hp_slope_xl_en_t *val)
 Accelerometer slope filter / high-pass filter selection on output.
int32_t ism330dhcx_xl_fast_settling_set (stmdev_ctx_t *ctx, uint8_t val)
 Enables accelerometer LPF2 and HPF fast-settling mode.
int32_t ism330dhcx_xl_fast_settling_get (stmdev_ctx_t *ctx, uint8_t *val)
 Enables accelerometer LPF2 and HPF fast-settling mode.
int32_t ism330dhcx_xl_hp_path_internal_set (stmdev_ctx_t *ctx, ism330dhcx_slope_fds_t val)
 HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions.
int32_t ism330dhcx_xl_hp_path_internal_get (stmdev_ctx_t *ctx, ism330dhcx_slope_fds_t *val)
 HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions.
int32_t ism330dhcx_gy_hp_path_internal_set (stmdev_ctx_t *ctx, ism330dhcx_hpm_g_t val)
 Enables gyroscope digital high-pass filter.
int32_t ism330dhcx_gy_hp_path_internal_get (stmdev_ctx_t *ctx, ism330dhcx_hpm_g_t *val)
 Enables gyroscope digital high-pass filter.

Detailed Description

This section group all the functions concerning the filters configuration.

Function Documentation

◆ ism330dhcx_filter_settling_mask_get()

int32_t ism330dhcx_filter_settling_mask_get ( stmdev_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.(ptr)
valChange the values of drdy_mask in reg CTRL4_C
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2773 of file ism330dhcx_reg.c.

References ism330dhcx_ctrl4_c_t::drdy_mask, ISM330DHCX_CTRL4_C, and ism330dhcx_read_reg().

◆ ism330dhcx_filter_settling_mask_set()

int32_t ism330dhcx_filter_settling_mask_set ( stmdev_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.(ptr)
valChange the values of drdy_mask in reg CTRL4_C
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2746 of file ism330dhcx_reg.c.

References ism330dhcx_ctrl4_c_t::drdy_mask, ISM330DHCX_CTRL4_C, ism330dhcx_read_reg(), and ism330dhcx_write_reg().

◆ ism330dhcx_gy_filter_lp1_get()

int32_t ism330dhcx_gy_filter_lp1_get ( stmdev_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.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of lpf1_sel_g in reg CTRL4_C
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2726 of file ism330dhcx_reg.c.

References ISM330DHCX_CTRL4_C, ism330dhcx_read_reg(), and ism330dhcx_ctrl4_c_t::lpf1_sel_g.

◆ ism330dhcx_gy_filter_lp1_set()

int32_t ism330dhcx_gy_filter_lp1_set ( stmdev_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.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of lpf1_sel_g in reg CTRL4_C
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2700 of file ism330dhcx_reg.c.

References ISM330DHCX_CTRL4_C, ism330dhcx_read_reg(), ism330dhcx_write_reg(), and ism330dhcx_ctrl4_c_t::lpf1_sel_g.

Referenced by QwDevISM330DHCX::setGyroFilterLP1().

◆ ism330dhcx_gy_hp_path_internal_get()

int32_t ism330dhcx_gy_hp_path_internal_get ( stmdev_ctx_t * ctx,
ism330dhcx_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.(ptr)
valGet the values of hp_en_g and hp_en_g in reg CTRL7_G
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3212 of file ism330dhcx_reg.c.

References ism330dhcx_ctrl7_g_t::hp_en_g, ism330dhcx_ctrl7_g_t::hpm_g, ISM330DHCX_CTRL7_G, ISM330DHCX_HP_FILTER_16mHz, ISM330DHCX_HP_FILTER_1Hz04, ISM330DHCX_HP_FILTER_260mHz, ISM330DHCX_HP_FILTER_65mHz, ISM330DHCX_HP_FILTER_NONE, and ism330dhcx_read_reg().

◆ ism330dhcx_gy_hp_path_internal_set()

int32_t ism330dhcx_gy_hp_path_internal_set ( stmdev_ctx_t * ctx,
ism330dhcx_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.(ptr)
valGet the values of hp_en_g and hp_en_g in reg CTRL7_G
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3184 of file ism330dhcx_reg.c.

References ism330dhcx_ctrl7_g_t::hp_en_g, ism330dhcx_ctrl7_g_t::hpm_g, ISM330DHCX_CTRL7_G, ism330dhcx_read_reg(), and ism330dhcx_write_reg().

◆ ism330dhcx_gy_lp1_bandwidth_get()

int32_t ism330dhcx_gy_lp1_bandwidth_get ( stmdev_ctx_t * ctx,
ism330dhcx_ftype_t * val )

Gyroscope low pass filter 1 bandwidth.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of ftype in reg CTRL6_C
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2819 of file ism330dhcx_reg.c.

References ism330dhcx_ctrl6_c_t::ftype, ISM330DHCX_AGGRESSIVE, ISM330DHCX_CTRL6_C, ISM330DHCX_LIGHT, ISM330DHCX_MEDIUM, ism330dhcx_read_reg(), ISM330DHCX_STRONG, ISM330DHCX_ULTRA_LIGHT, ISM330DHCX_VERY_LIGHT, ISM330DHCX_VERY_STRONG, and ISM330DHCX_XTREME.

◆ ism330dhcx_gy_lp1_bandwidth_set()

int32_t ism330dhcx_gy_lp1_bandwidth_set ( stmdev_ctx_t * ctx,
ism330dhcx_ftype_t val )

Gyroscope low pass filter 1 bandwidth.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of ftype in reg CTRL6_C
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2793 of file ism330dhcx_reg.c.

References ism330dhcx_ctrl6_c_t::ftype, ISM330DHCX_CTRL6_C, ism330dhcx_read_reg(), and ism330dhcx_write_reg().

Referenced by QwDevISM330DHCX::setGyroLP1Bandwidth().

◆ ism330dhcx_xl_fast_settling_get()

int32_t ism330dhcx_xl_fast_settling_get ( stmdev_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 powerdown mode.[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of fastsettl_mode_xl in reg CTRL8_XL
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3101 of file ism330dhcx_reg.c.

References ism330dhcx_ctrl8_xl_t::fastsettl_mode_xl, ISM330DHCX_CTRL8_XL, and ism330dhcx_read_reg().

◆ ism330dhcx_xl_fast_settling_set()

int32_t ism330dhcx_xl_fast_settling_set ( stmdev_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 powerdown mode.[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of fastsettl_mode_xl in reg CTRL8_XL
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3073 of file ism330dhcx_reg.c.

References ism330dhcx_ctrl8_xl_t::fastsettl_mode_xl, ISM330DHCX_CTRL8_XL, ism330dhcx_read_reg(), and ism330dhcx_write_reg().

◆ ism330dhcx_xl_filter_lp2_get()

int32_t ism330dhcx_xl_filter_lp2_get ( stmdev_ctx_t * ctx,
uint8_t * val )

Accelerometer output from LPF2 filtering stage selection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of lpf2_xl_en in reg CTRL1_XL
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2680 of file ism330dhcx_reg.c.

References ISM330DHCX_CTRL1_XL, ism330dhcx_read_reg(), and ism330dhcx_ctrl1_xl_t::lpf2_xl_en.

◆ ism330dhcx_xl_filter_lp2_set()

int32_t ism330dhcx_xl_filter_lp2_set ( stmdev_ctx_t * ctx,
uint8_t val )

Accelerometer output from LPF2 filtering stage selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of lpf2_xl_en in reg CTRL1_XL
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2655 of file ism330dhcx_reg.c.

References ISM330DHCX_CTRL1_XL, ism330dhcx_read_reg(), ism330dhcx_write_reg(), and ism330dhcx_ctrl1_xl_t::lpf2_xl_en.

Referenced by QwDevISM330DHCX::setAccelFilterLP2().

◆ ism330dhcx_xl_hp_path_internal_get()

int32_t ism330dhcx_xl_hp_path_internal_get ( stmdev_ctx_t * ctx,
ism330dhcx_slope_fds_t * val )

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

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of slope_fds in reg TAP_CFG0
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3149 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG0, ISM330DHCX_USE_HPF, ISM330DHCX_USE_SLOPE, and ism330dhcx_tap_cfg0_t::slope_fds.

◆ ism330dhcx_xl_hp_path_internal_set()

int32_t ism330dhcx_xl_hp_path_internal_set ( stmdev_ctx_t * ctx,
ism330dhcx_slope_fds_t val )

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

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of slope_fds in reg TAP_CFG0
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3122 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG0, ism330dhcx_write_reg(), and ism330dhcx_tap_cfg0_t::slope_fds.

◆ ism330dhcx_xl_hp_path_on_out_get()

◆ ism330dhcx_xl_hp_path_on_out_set()

int32_t ism330dhcx_xl_hp_path_on_out_set ( stmdev_ctx_t * ctx,
ism330dhcx_hp_slope_xl_en_t val )

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

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of hp_slope_xl_en in reg CTRL8_XL
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2922 of file ism330dhcx_reg.c.

References ism330dhcx_ctrl8_xl_t::hp_ref_mode_xl, ism330dhcx_ctrl8_xl_t::hp_slope_xl_en, ism330dhcx_ctrl8_xl_t::hpcf_xl, ISM330DHCX_CTRL8_XL, ism330dhcx_read_reg(), and ism330dhcx_write_reg().

Referenced by QwDevISM330DHCX::setAccelSlopeFilter().

◆ ism330dhcx_xl_lp2_on_6d_get()

int32_t ism330dhcx_xl_lp2_on_6d_get ( stmdev_ctx_t * ctx,
uint8_t * val )

Low pass filter 2 on 6D function selection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of low_pass_on_6d in reg CTRL8_XL
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2902 of file ism330dhcx_reg.c.

References ISM330DHCX_CTRL8_XL, ism330dhcx_read_reg(), and ism330dhcx_ctrl8_xl_t::low_pass_on_6d.

◆ ism330dhcx_xl_lp2_on_6d_set()

int32_t ism330dhcx_xl_lp2_on_6d_set ( stmdev_ctx_t * ctx,
uint8_t val )

Low pass filter 2 on 6D function selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of low_pass_on_6d in reg CTRL8_XL
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2877 of file ism330dhcx_reg.c.

References ISM330DHCX_CTRL8_XL, ism330dhcx_read_reg(), ism330dhcx_write_reg(), and ism330dhcx_ctrl8_xl_t::low_pass_on_6d.