mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
326 lines
10 KiB
Plaintext
326 lines
10 KiB
Plaintext
# Copyright (c) 2021 Gunar Schorcht
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU Lesser
|
|
# General Public License v2.1. See the file LICENSE in the top level
|
|
# directory for more details.
|
|
#
|
|
|
|
if USEMODULE_L3GXXXX
|
|
|
|
|
|
choice
|
|
bool "Output data rate (ODR)"
|
|
default L3GXXXX_ODR_100_25
|
|
help
|
|
Measurements are performed at a defined output rate (ODR) with a
|
|
user selectable bandwidth. Select the ouput data rate of the sensor
|
|
an the cutoff frequency of the LPF2 filter. The cutoff frequency of
|
|
LPF1 is fix for a given output data rate.
|
|
|
|
config L3GXXXX_ODR_100_12
|
|
bool "High ODR 100 Hz, LPF2 cutoff 12.5 Hz (LPF1 cutoff 32 Hz)"
|
|
config L3GXXXX_ODR_100_25
|
|
bool "High ODR 100 Hz, LPF2 cutoff 25 Hz (LPF1 cutoff 32 Hz)"
|
|
config L3GXXXX_ODR_200_12
|
|
bool "High ODR 200 Hz, LPF1 cutoff 63.3 Hz, LPF2 cutoff 12.5 Hz"
|
|
config L3GXXXX_ODR_200_25
|
|
bool "High ODR 200 Hz, LPF1 cutoff 63.3 Hz, LPF2 cutoff 25 Hz"
|
|
config L3GXXXX_ODR_200_50
|
|
bool "High ODR 200 Hz, LPF1 cutoff 63.3 Hz, LPF2 cutoff 50 Hz"
|
|
config L3GXXXX_ODR_200_70
|
|
bool "High ODR 200 Hz, LPF1 cutoff 63.3 Hz, LPF2 cutoff 70 Hz"
|
|
config L3GXXXX_ODR_400_20
|
|
bool "High ODR 400 Hz, LPF1 cutoff 128 Hz, LPF2 cutoff 20 Hz"
|
|
config L3GXXXX_ODR_400_25
|
|
bool "High ODR 400 Hz, LPF1 cutoff 128 Hz, LPF2 cutoff 25 Hz"
|
|
config L3GXXXX_ODR_400_50
|
|
bool "High ODR 400 Hz, LPF1 cutoff 128 Hz, LPF2 cutoff 50 Hz"
|
|
config L3GXXXX_ODR_400_110
|
|
bool "High ODR 400 Hz, LPF1 cutoff 128 Hz, LPF2 cutoff 110 Hz"
|
|
config L3GXXXX_ODR_800_30
|
|
bool "High ODR 800 Hz, LPF1 cutoff 211 Hz, LPF2 cutoff 30 Hz"
|
|
config L3GXXXX_ODR_800_35
|
|
bool "High ODR 800 Hz, LPF1 cutoff 211 Hz, LPF2 cutoff 35 Hz"
|
|
config L3GXXXX_ODR_800_50
|
|
bool "High ODR 800 Hz, LPF1 cutoff 211 Hz, LPF2 cutoff 50 Hz"
|
|
config L3GXXXX_ODR_800_100
|
|
bool "High ODR 800 Hz, LPF1 cutoff 211 Hz, LPF2 cutoff 100 Hz"
|
|
|
|
if USEMODULE_L3GXXXX_LOW_ODR
|
|
|
|
config L3GXXXX_ODR_12
|
|
bool "Low ODR 12.5 Hz, LPF1 cutoff 3.9 Hz, LPF2 not used"
|
|
config L3GXXXX_ODR_25
|
|
bool "Low ODR 25 Hz, LPF1 cutoff 7.8 Hz, LPF2 not used"
|
|
config L3GXXXX_ODR_50
|
|
bool "Low ODR 50 Hz, LPF1 cutoff 16 Hz, LPF2 cutoff 16.6 Hz"
|
|
|
|
endif # USEMODULE_L3GXXXX_LOW_ODR
|
|
|
|
endchoice
|
|
|
|
choice
|
|
bool "Full scale"
|
|
default L3GXXXX_SCALE_245_DPS
|
|
help
|
|
The full scale value determines the sensitivity of the sensor and thus
|
|
the range and resolution of the sensor's output data. The resolution
|
|
of the output data is about Full Scale/INT16_MAX.
|
|
|
|
config L3GXXXX_SCALE_245_DPS
|
|
bool "±245 dps"
|
|
help
|
|
The typical sensitivity is 8.75 mdps.
|
|
|
|
if !USEMODULE_A3G4250D
|
|
|
|
config L3GXXXX_SCALE_500_DPS
|
|
bool "±500 dps"
|
|
help
|
|
The Typical sensitivity is 17.5 mdps.
|
|
|
|
config L3GXXXX_SCALE_2000_DPS
|
|
bool "±2000 dps"
|
|
help
|
|
The typical sensitivity is 70 mdps.
|
|
|
|
endif # !USEMODULE_A3G4250D
|
|
|
|
endchoice
|
|
|
|
choice
|
|
bool "Filters used for output data"
|
|
default L3GXXXX_HPF_AND_LPF2
|
|
help
|
|
L3Gxxxx sensors integrate a combination of two low pass filters (LPF)
|
|
and one high pass filter (HPF) which can be used to filter the output
|
|
data. First, raw sensor data are always filtered by LPF1 with a cutoff
|
|
frequency that is fixed for the selected output data rate (ODR).
|
|
The resulting data can then optionally be filtered by HPF and LPF2.
|
|
Both filters can be used or bypassed.
|
|
Please note: The filter selection for the output data also affects the
|
|
filter selection for event interrupt generation. If the HPF is enabled
|
|
for filtering the output data, it is also active for filtering the
|
|
sensor data used for interrupt generation if the LPF2 is enabled for
|
|
interrupt generation.
|
|
|
|
config L3GXXXX_NO_FILTER
|
|
bool "HPF and LPF2 are not used"
|
|
|
|
config L3GXXXX_HPF_ONLY
|
|
bool "only HPF is used"
|
|
|
|
config L3GXXXX_LPF2_ONLY
|
|
bool "only LPF2 used"
|
|
|
|
config L3GXXXX_HPF_AND_LPF2
|
|
bool "HPF and LPF2 are used"
|
|
|
|
endchoice
|
|
|
|
if L3GXXXX_HPF_ONLY || L3GXXXX_HPF_AND_LPF2 || L3GXXXX_INT1_HPF_ONLY || L3GXXXX_INT1_HPF_AND_LPF2
|
|
|
|
choice
|
|
bool "HPF mode"
|
|
help
|
|
The high pass filter (HPF) can be used in different modes. Select
|
|
the right one.
|
|
|
|
config L3GXXXX_HPF_NORMAL
|
|
bool "Normal mode"
|
|
help
|
|
In Normal mode, the HPF is reset by reading REFERENCE register.
|
|
|
|
config L3GXXXX_HPF_REFERENCE
|
|
bool "Reference mode"
|
|
help
|
|
In Reference mode, the output data are the difference to the
|
|
value written to the REFERENCE register.
|
|
|
|
config L3GXXXX_HPF_AUTORESET
|
|
bool "Autoreset mode"
|
|
help
|
|
In Autoreset mode, the HPF is automatically reset when a configured
|
|
interrupt event occurs.
|
|
|
|
endchoice
|
|
|
|
config L3GXXXX_HPF_CUTOFF
|
|
int "HPF cutoff frequency n = [0...9]"
|
|
range 0 9
|
|
default 0
|
|
help
|
|
The cutoff frequency is specified as a value from 0 to 9, which defines
|
|
the cutoff frequency depending on the selected sensor mode and the
|
|
output data rate. Details can be found in the data sheet for the CTRL2
|
|
register field HPCF.
|
|
|
|
endif # L3GXXXX_HPF_ONLY || L3GXXXX_HPF_AND_LPF2 || L3GXXXX_INT1_HPF_ONLY || L3GXXXX_INT1_HPF_AND_LPF2
|
|
|
|
if USEMODULE_L3GXXXX_FIFO
|
|
|
|
choice
|
|
bool "FIFO mode"
|
|
default L3GXXXX_FIFO_MODE_FIFO
|
|
help
|
|
The 32 level FIFO is used to collect a number of sensor
|
|
data samples before the data have to be fetched by the MCU. Select
|
|
the right mode of the FIFO.
|
|
|
|
config L3GXXXX_FIFO_MODE_BYPASS
|
|
bool "Bypass mode (FIFO is not used)"
|
|
help
|
|
The FIFO is not used.
|
|
|
|
config L3GXXXX_FIFO_MODE_FIFO
|
|
bool "FIFO mode"
|
|
help
|
|
Data samples are stored in the FIFO until it is full.
|
|
|
|
config L3GXXXX_FIFO_MODE_STREAM
|
|
bool "Stream mode"
|
|
help
|
|
The FIFO is used as ring buffer and newest data samples are stored.
|
|
continuously
|
|
|
|
config L3GXXXX_FIFO_MODE_DYNAMIC_STREAM
|
|
bool "Dynamic Stream mode"
|
|
help
|
|
Like the Stream mode, but differs in reading the first data sample
|
|
after emptying.
|
|
|
|
config L3GXXXX_FIFO_MODE_STREAM_TO_FIFO
|
|
bool "Stream-to-FIFO mode"
|
|
help
|
|
The FIFO is used in stream mode until an event interrupt is triggered
|
|
and then switches to FIFO mode.
|
|
|
|
config L3GXXXX_FIFO_MODE_BYPASS_TO_STREAM
|
|
bool "Bypass-to-Stream mode"
|
|
help
|
|
The FIFO is not used until an event interrupt is triggered
|
|
and then switches to Stream mode
|
|
|
|
config L3GXXXX_FIFO_MODE_BYPASS_TO_FIFO
|
|
bool "Bypass-to-FIFO mode"
|
|
help
|
|
The FIFO is not used until an event interrupt is triggered
|
|
and then switches to FIFO mode.
|
|
|
|
endchoice
|
|
|
|
config L3GXXXX_FIFO_WATERMARK
|
|
int "FIFO watermark level (threshold)"
|
|
range 1 23
|
|
default 31
|
|
help
|
|
If the number of data samples in FIFO becomes greater than this
|
|
watermark level (threshold), the WTM (FTH) flag in FIFO_SRC register
|
|
is set and an interrupt can be triggered on signal INT2/DRDY if data
|
|
ready and FIFO status interrupts is enabled.
|
|
|
|
endif # USEMODULE_L3GXXXX_FIFO
|
|
|
|
if USEMODULE_L3GXXXX_IRQ_EVENT
|
|
|
|
config L3GXXXX_INT1_X_THRESH
|
|
int "Threshold for X axis events"
|
|
range 0 32767
|
|
default 4012
|
|
help
|
|
Threshold values are defined for raw data values. Their resolution
|
|
therefore depends on the selected full range (default ~30 at 245 dps):
|
|
254 dps -> LSB value ~7.5 mdps,
|
|
500 dps -> LSB value ~15.3 mdps,
|
|
2000 dps -> LSB value ~61 mdps
|
|
|
|
config L3GXXXX_INT1_Y_THRESH
|
|
int "Threshold for Y axis events"
|
|
range 0 32767
|
|
default 4012
|
|
help
|
|
Threshold values are defined for raw data values. Their resolution
|
|
therefore depends on the selected full range (default ~30 at 245 dps):
|
|
254 dps -> LSB value ~7.5 mdps,
|
|
500 dps -> LSB value ~15.3 mdps,
|
|
2000 dps -> LSB value ~61 mdps
|
|
|
|
config L3GXXXX_INT1_Z_THRESH
|
|
int "Threshold for Z axis events"
|
|
range 0 32767
|
|
default 4012
|
|
help
|
|
Threshold values are defined for raw data values. Their resolution
|
|
therefore depends on the selected full range (default ~30 at 245 dps):
|
|
254 dps -> LSB value ~7.5 mdps,
|
|
500 dps -> LSB value ~15.3 mdps,
|
|
2000 dps -> LSB value ~61 mdps
|
|
|
|
config L3GXXXX_INT1_X_GT_THRESH
|
|
bool "Interrupt generation enabled for |X| > X threshold (X high event)"
|
|
default y
|
|
|
|
config L3GXXXX_INT1_X_LT_THRESH
|
|
bool "Interrupt generation enabled for |X| < X threshold (X low event)"
|
|
default n
|
|
|
|
config L3GXXXX_INT1_Y_GT_THRESH
|
|
bool "Interrupt generation enabled for |Y| > Y threshold (Y high event)"
|
|
default y
|
|
|
|
config L3GXXXX_INT1_Y_LT_THRESH
|
|
bool "Interrupt generation enabled for |Y| < Y threshold (Y low event)"
|
|
default n
|
|
|
|
config L3GXXXX_INT1_Z_GT_THRESH
|
|
bool "Interrupt generation enabled for |Z| > Z threshold (Z high event)"
|
|
default y
|
|
|
|
config L3GXXXX_INT1_Z_LT_THRESH
|
|
bool "Interrupt generation enabled for |Z| < Z threshold (Z low event)"
|
|
default n
|
|
|
|
choice
|
|
bool "Filters used for event interrupt generation"
|
|
default L3GXXXX_INT1_HPF_AND_LPF2
|
|
help
|
|
The combination of high pass filter (HPF) and low pass filter 2 (LPF2)
|
|
can also be used to filter the sensor data for event interrupt
|
|
generation.
|
|
Please note: The filter selection for the interrupt generation also
|
|
affects the filter selection for the output data. If the HPF is enabled
|
|
for interrupt generation, it is also active for filtering the
|
|
output data if the LPF2 is enabled for output data.
|
|
|
|
config L3GXXXX_INT1_NO_FILTER
|
|
bool "HPF and LPF2 are not used"
|
|
|
|
config L3GXXXX_INT1_HPF_ONLY
|
|
bool "only HPF is used"
|
|
|
|
config L3GXXXX_INT1_LPF2_ONLY
|
|
bool "only LPF2 used"
|
|
|
|
config L3GXXXX_INT1_HPF_AND_LPF2
|
|
bool "HPF and LPF2 are used"
|
|
|
|
endchoice
|
|
|
|
config L3GXXXX_INT1_AND
|
|
bool "Combination of interupt events"
|
|
default n
|
|
help
|
|
y (AND) = all enabled axes passed their tresholds,
|
|
n (OR) = at least one axis passed its threshold
|
|
|
|
config L3GXXXX_INT1_LATCH
|
|
bool "Interrupt latch enable"
|
|
default n
|
|
help
|
|
If enabled, the interrupt is latched until the interrupt source has
|
|
been read.
|
|
|
|
endif # USEMODULE_L3GXXXX_IRQ_EVENT
|
|
|
|
endif # USEMODULE_L3GXXXX
|