BMX280THP(4) Device Drivers Manual BMX280THP(4)

bmx280thpDriver for Bosch BMP280/BME280 sensor chip via I2C bus

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


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

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.

The following sysctl(3) variables are provided:

 
 
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.
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.
 
 
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.
 
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.
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.

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

The bmx280thp driver first appeared in NetBSD 10.0.

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

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

November 19, 2022 NetBSD 10.99