BMX280THP(4)

BMX280THP(4) | Device Drivers Manual | BMX280THP(4)

# NAME

`bmx280thp` — Driver for Bosch BMP280/BME280 sensor chip via I2C bus

# SYNOPSIS

`bmx280thp* at iic? addr 0x76`
`bmx280thp* at iic? addr 0x77`

`bmx280thp* at spi? slave 0`
`bmx280thp* at spi? slave 1`

# DESCRIPTION

The `bmx280thp` driver provides measurements from the BMP280 and BME280 temperature, humidity and barometric pressure sensors via the envsys(4) framework. The `bmx280thp` addr argument selects the address at the iic(4) bus and the `bmx280thp` slave argument selects which chip select will be used on the spi(4) bus. The precision of the measurement which is related to the over sampling performed on the measurement can be changed through sysctl(8) nodes.

# SYSCTL VARIABLES

The following sysctl(3) variables are provided:

`hw.bmx280thp0.osrs_t`
`hw.bmx280thp0.osrs_p`
`hw.bmx280thp0.osrs_h`
  These control oversampling of temperature, pressure and humidity. The valid values are 1, 2, 4, 8, and 16 times oversample. Humidity is only available if the chip is a BME280.
`hw.bmx280thp0.irr_samples`
  IRR is a filter that can be used to reduce the noise in the measurement. The value values are 1 (or off), 2, 5, 11 and 22 samples to reach >= 75% of the step response.
`hw.bmx280thp0.waitfactor.t`
`hw.bmx280thp0.waitfactor.p`
`hw.bmx280thp0.waitfactor.h`
  These control the wait multiplication factor for a measurement cycle. This factor is different for temperature, pressure and humidity and is based upon the values of osrs_t, osrs_p and osrs_h. If the chip does not return the correct measurements for a given over sampling then the wait factors can be adjusted to allow more time for the measurement to complete successfully.
`hw.bmx280thp0.debug`
`hw.bmx280thp0.dump_calibration`
  If the driver is compiled with `BMX280_DEBUG`, these nodes will appear and can be used to set the debugging level and provide the calibration constants, upon refresh, that are stored in the chip. Since the constants are fixed, this is a boolean node and will reset back to false once one dump has been performed.
`hw.bmx280thp0.readattempts`
  A status register tells the driver if the chip is busy with a measurement. This status register must be polled and readattempts is the number of times that this poll will be performed. The default is 25 which should be more than enough for most purposes.

# SEE ALSO

envsys(4), iic(4), spi(4), envstat(8), sysctl(8)

# HISTORY

The `bmx280thp` driver first appeared in NetBSD 10.0.

# AUTHORS

The `bmx280thp` driver was written by Brad Spencer <brad@anduin.eldar.org>.

# BUGS

The driver does not support the continuous read mode that the BMP280 and BME280 has.

November 19, 2022 | NetBSD 11.0