Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Bosch BMP581 Barometric pressure sensor. More...

Files

file  bmp581_user.h
 Header file for extended sensor API of BMP581 sensor.
file  bmp581.h
 Header file for BMP581 sensor Devicetree constants.

Macros

#define BMP5_ATTR_IIR_CONFIG   (SENSOR_ATTR_PRIV_START + 1u)
 IIR configuration for pressure and temperature channels.
#define BMP5_ATTR_POWER_MODE   (SENSOR_ATTR_PRIV_START + 2u)
 Power mode.

Enumerations

enum  bmp5_powermode {
  BMP5_POWERMODE_STANDBY , BMP5_POWERMODE_NORMAL , BMP5_POWERMODE_FORCED , BMP5_POWERMODE_CONTINUOUS ,
  BMP5_POWERMODE_DEEP_STANDBY
}
 BMP581 power modes. More...

Sensor power modes

Values for the power-mode devicetree property.

#define BMP581_DT_MODE_NORMAL   1
 NORMAL mode.
#define BMP581_DT_MODE_FORCED   2
 FORCED mode.
#define BMP581_DT_MODE_CONTINUOUS   3
 CONTINUOUS mode.

Output data rate options

Values for the odr devicetree property.

#define BMP581_DT_ODR_240_HZ   0x00
 240 Hz
#define BMP581_DT_ODR_218_5_HZ   0x01
 218.5 Hz
#define BMP581_DT_ODR_199_1_HZ   0x02
 199.1 Hz
#define BMP581_DT_ODR_179_2_HZ   0x03
 179.2 Hz
#define BMP581_DT_ODR_160_HZ   0x04
 160 Hz
#define BMP581_DT_ODR_149_3_HZ   0x05
 149.3 Hz
#define BMP581_DT_ODR_140_HZ   0x06
 140 Hz
#define BMP581_DT_ODR_129_8_HZ   0x07
 129.8 Hz
#define BMP581_DT_ODR_120_HZ   0x08
 120 Hz
#define BMP581_DT_ODR_110_1_HZ   0x09
 110.1 Hz
#define BMP581_DT_ODR_100_2_HZ   0x0A
 100.2 Hz
#define BMP581_DT_ODR_89_6_HZ   0x0B
 89.6 Hz
#define BMP581_DT_ODR_80_HZ   0x0C
 80 Hz
#define BMP581_DT_ODR_70_HZ   0x0D
 70 Hz
#define BMP581_DT_ODR_60_HZ   0x0E
 60 Hz
#define BMP581_DT_ODR_50_HZ   0x0F
 50 Hz
#define BMP581_DT_ODR_45_HZ   0x10
 45 Hz
#define BMP581_DT_ODR_40_HZ   0x11
 40 Hz
#define BMP581_DT_ODR_35_HZ   0x12
 35 Hz
#define BMP581_DT_ODR_30_HZ   0x13
 30 Hz
#define BMP581_DT_ODR_25_HZ   0x14
 25 Hz
#define BMP581_DT_ODR_20_HZ   0x15
 20 Hz
#define BMP581_DT_ODR_15_HZ   0x16
 15 Hz
#define BMP581_DT_ODR_10_HZ   0x17
 10 Hz
#define BMP581_DT_ODR_5_HZ   0x18
 5 Hz
#define BMP581_DT_ODR_4_HZ   0x19
 4 Hz
#define BMP581_DT_ODR_3_HZ   0x1A
 3 Hz
#define BMP581_DT_ODR_2_HZ   0x1B
 2 Hz
#define BMP581_DT_ODR_1_HZ   0x1C
 1 Hz
#define BMP581_DT_ODR_0_5_HZ   0x1D
 0.5 Hz
#define BMP581_DT_ODR_0_250_HZ   0x1E
 0.250 Hz
#define BMP581_DT_ODR_0_125_HZ   0x1F
 0.125 Hz

Oversampling options

Values for the press-osr and temp-osr devicetree properties.

Valid values for temperature and pressure sensor oversampling ratio.

#define BMP581_DT_OVERSAMPLING_1X   0x00
 x1
#define BMP581_DT_OVERSAMPLING_2X   0x01
 x2
#define BMP581_DT_OVERSAMPLING_4X   0x02
 x4
#define BMP581_DT_OVERSAMPLING_8X   0x03
 x8
#define BMP581_DT_OVERSAMPLING_16X   0x04
 x16
#define BMP581_DT_OVERSAMPLING_32X   0x05
 x32
#define BMP581_DT_OVERSAMPLING_64X   0x06
 x64
#define BMP581_DT_OVERSAMPLING_128X   0x07
 x128

IIR Filter options

Values for the press-iir and temp-iir devicetree properties.

Valid values for temperature and pressure IIR filter coefficient.

\‍[  data_n = \frac{data_{n-1} \times filtercoefficient + data_{in}}{filtercoefficient + 1}
\‍]

where:

  • $ data_n $ is the current filtered output
  • $ data_{n-1} $ is the previous filtered output
  • $ data_{in} $ is the current input sample
  • $ filtercoefficient $ is one of the coefficient values below

Higher coefficient values provide more filtering (smoother output) but increase response time.

#define BMP581_DT_IIR_FILTER_BYPASS   0x00
 Bypass.
#define BMP581_DT_IIR_FILTER_COEFF_1   0x01
 1
#define BMP581_DT_IIR_FILTER_COEFF_3   0x02
 3
#define BMP581_DT_IIR_FILTER_COEFF_7   0x03
 7
#define BMP581_DT_IIR_FILTER_COEFF_15   0x04
 15
#define BMP581_DT_IIR_FILTER_COEFF_31   0x05
 31
#define BMP581_DT_IIR_FILTER_COEFF_63   0x06
 63
#define BMP581_DT_IIR_FILTER_COEFF_127   0x07
 127

Detailed Description

Bosch BMP581 Barometric pressure sensor.

Macro Definition Documentation

◆ BMP581_DT_IIR_FILTER_BYPASS

#define BMP581_DT_IIR_FILTER_BYPASS   0x00

◆ BMP581_DT_IIR_FILTER_COEFF_1

#define BMP581_DT_IIR_FILTER_COEFF_1   0x01

◆ BMP581_DT_IIR_FILTER_COEFF_127

#define BMP581_DT_IIR_FILTER_COEFF_127   0x07

◆ BMP581_DT_IIR_FILTER_COEFF_15

#define BMP581_DT_IIR_FILTER_COEFF_15   0x04

◆ BMP581_DT_IIR_FILTER_COEFF_3

#define BMP581_DT_IIR_FILTER_COEFF_3   0x02

◆ BMP581_DT_IIR_FILTER_COEFF_31

#define BMP581_DT_IIR_FILTER_COEFF_31   0x05

◆ BMP581_DT_IIR_FILTER_COEFF_63

#define BMP581_DT_IIR_FILTER_COEFF_63   0x06

◆ BMP581_DT_IIR_FILTER_COEFF_7

#define BMP581_DT_IIR_FILTER_COEFF_7   0x03

◆ BMP581_DT_MODE_CONTINUOUS

#define BMP581_DT_MODE_CONTINUOUS   3

#include <zephyr/dt-bindings/sensor/bmp581.h>

CONTINUOUS mode.

◆ BMP581_DT_MODE_FORCED

#define BMP581_DT_MODE_FORCED   2

#include <zephyr/dt-bindings/sensor/bmp581.h>

FORCED mode.

◆ BMP581_DT_MODE_NORMAL

#define BMP581_DT_MODE_NORMAL   1

#include <zephyr/dt-bindings/sensor/bmp581.h>

NORMAL mode.

◆ BMP581_DT_ODR_0_125_HZ

#define BMP581_DT_ODR_0_125_HZ   0x1F

◆ BMP581_DT_ODR_0_250_HZ

#define BMP581_DT_ODR_0_250_HZ   0x1E

◆ BMP581_DT_ODR_0_5_HZ

#define BMP581_DT_ODR_0_5_HZ   0x1D

◆ BMP581_DT_ODR_100_2_HZ

#define BMP581_DT_ODR_100_2_HZ   0x0A

◆ BMP581_DT_ODR_10_HZ

#define BMP581_DT_ODR_10_HZ   0x17

◆ BMP581_DT_ODR_110_1_HZ

#define BMP581_DT_ODR_110_1_HZ   0x09

◆ BMP581_DT_ODR_120_HZ

#define BMP581_DT_ODR_120_HZ   0x08

◆ BMP581_DT_ODR_129_8_HZ

#define BMP581_DT_ODR_129_8_HZ   0x07

◆ BMP581_DT_ODR_140_HZ

#define BMP581_DT_ODR_140_HZ   0x06

◆ BMP581_DT_ODR_149_3_HZ

#define BMP581_DT_ODR_149_3_HZ   0x05

◆ BMP581_DT_ODR_15_HZ

#define BMP581_DT_ODR_15_HZ   0x16

◆ BMP581_DT_ODR_160_HZ

#define BMP581_DT_ODR_160_HZ   0x04

◆ BMP581_DT_ODR_179_2_HZ

#define BMP581_DT_ODR_179_2_HZ   0x03

◆ BMP581_DT_ODR_199_1_HZ

#define BMP581_DT_ODR_199_1_HZ   0x02

◆ BMP581_DT_ODR_1_HZ

#define BMP581_DT_ODR_1_HZ   0x1C

◆ BMP581_DT_ODR_20_HZ

#define BMP581_DT_ODR_20_HZ   0x15

◆ BMP581_DT_ODR_218_5_HZ

#define BMP581_DT_ODR_218_5_HZ   0x01

◆ BMP581_DT_ODR_240_HZ

#define BMP581_DT_ODR_240_HZ   0x00

◆ BMP581_DT_ODR_25_HZ

#define BMP581_DT_ODR_25_HZ   0x14

◆ BMP581_DT_ODR_2_HZ

#define BMP581_DT_ODR_2_HZ   0x1B

◆ BMP581_DT_ODR_30_HZ

#define BMP581_DT_ODR_30_HZ   0x13

◆ BMP581_DT_ODR_35_HZ

#define BMP581_DT_ODR_35_HZ   0x12

◆ BMP581_DT_ODR_3_HZ

#define BMP581_DT_ODR_3_HZ   0x1A

◆ BMP581_DT_ODR_40_HZ

#define BMP581_DT_ODR_40_HZ   0x11

◆ BMP581_DT_ODR_45_HZ

#define BMP581_DT_ODR_45_HZ   0x10

◆ BMP581_DT_ODR_4_HZ

#define BMP581_DT_ODR_4_HZ   0x19

◆ BMP581_DT_ODR_50_HZ

#define BMP581_DT_ODR_50_HZ   0x0F

◆ BMP581_DT_ODR_5_HZ

#define BMP581_DT_ODR_5_HZ   0x18

◆ BMP581_DT_ODR_60_HZ

#define BMP581_DT_ODR_60_HZ   0x0E

◆ BMP581_DT_ODR_70_HZ

#define BMP581_DT_ODR_70_HZ   0x0D

◆ BMP581_DT_ODR_80_HZ

#define BMP581_DT_ODR_80_HZ   0x0C

◆ BMP581_DT_ODR_89_6_HZ

#define BMP581_DT_ODR_89_6_HZ   0x0B

◆ BMP581_DT_OVERSAMPLING_128X

#define BMP581_DT_OVERSAMPLING_128X   0x07

◆ BMP581_DT_OVERSAMPLING_16X

#define BMP581_DT_OVERSAMPLING_16X   0x04

◆ BMP581_DT_OVERSAMPLING_1X

#define BMP581_DT_OVERSAMPLING_1X   0x00

◆ BMP581_DT_OVERSAMPLING_2X

#define BMP581_DT_OVERSAMPLING_2X   0x01

◆ BMP581_DT_OVERSAMPLING_32X

#define BMP581_DT_OVERSAMPLING_32X   0x05

◆ BMP581_DT_OVERSAMPLING_4X

#define BMP581_DT_OVERSAMPLING_4X   0x02

◆ BMP581_DT_OVERSAMPLING_64X

#define BMP581_DT_OVERSAMPLING_64X   0x06

◆ BMP581_DT_OVERSAMPLING_8X

#define BMP581_DT_OVERSAMPLING_8X   0x03

◆ BMP5_ATTR_IIR_CONFIG

#define BMP5_ATTR_IIR_CONFIG   (SENSOR_ATTR_PRIV_START + 1u)

#include <zephyr/drivers/sensor/bmp581_user.h>

IIR configuration for pressure and temperature channels.

sensor_value.val1 is the IIR filter coefficient for temperature. sensor_value.val2 is the IIR filter coefficient for pressure.

See bmp581_iir_filter for the valid values.

◆ BMP5_ATTR_POWER_MODE

#define BMP5_ATTR_POWER_MODE   (SENSOR_ATTR_PRIV_START + 2u)

#include <zephyr/drivers/sensor/bmp581_user.h>

Power mode.

The attribute value should be a bmp5_powermode enum value.

Enumeration Type Documentation

◆ bmp5_powermode

#include <zephyr/drivers/sensor/bmp581_user.h>

BMP581 power modes.

Enumerator
BMP5_POWERMODE_STANDBY 

Standby powermode.

BMP5_POWERMODE_NORMAL 

Normal powermode.

BMP5_POWERMODE_FORCED 

Forced powermode.

BMP5_POWERMODE_CONTINUOUS 

Continuous powermode.

BMP5_POWERMODE_DEEP_STANDBY 

Deep standby powermode.