Data Sheet
Final Datasheet
BME280 Environmental sensor
Page 21
BST-BME280-DS001-10 | Revision 1.1 | May 2015 Bosch Sensortec
© Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to
third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany.
Note: Specifications within this document are subject to change without notice.
4. Data readout
To read out data after a conversion, it is strongly recommended to use a burst read and not
address every register individually. This will prevent a possible mix-up of bytes belonging to
different measurements and reduce interface traffic. Note that in I²C mode, even when pressure
was not measured, reading the unused registers is faster than reading temperature and
humidity data separately.
Data readout is done by starting a burst read from 0xF7 to 0xFC (temperature and pressure) or
from 0xF7 to 0xFE (temperature, pressure and humidity). The data are read out in an unsigned
20-bit format both for pressure and for temperature and in an unsigned 16-bit format for
humidity. It is strongly recommended to use the BME280 API, available from Bosch Sensortec,
for readout and compensation. For details on memory map and interfaces, please consult
chapters 5 and 6 respectively.
After the uncompensated values for pressure, temperature and humidity , have
been read, the actual humidity, pressure and temperature needs to be calculated using the
compensation parameters stored in the device. The procedure is elaborated in chapter 4.2.
4.1 Data register shadowing
In normal mode, the timing of measurements is not necessarily synchronized to the readout by
the user. This means that new measurement results may become available while the user is
reading the results from the previous measurement. In this case, shadowing is performed in
order to guarantee data consistency. Shadowing will only work if all data registers are read in a
single burst read. Therefore, the user must use burst reads if he does not synchronize data
readout with the measurement cycle. Using several independent read commands may result in
inconsistent data.
If a new measurement is finished and the data registers are still being read, the new
measurement results are transferred into shadow data registers. The content of shadow
registers is transferred into data registers as soon as the user ends the burst read, even if not all
data registers were read.
The end of the burst read is marked by the rising edge of CSB pin in SPI case or by the
recognition of a stop condition in I
2
C case. After the end of the burst read, all user data registers
are updated at once.
4.2 Output compensation
The BME280 output consists of the ADC output values. However, each sensing element
behaves differently. Therefore, the actual pressure and temperature must be calculated using a
set of calibration parameters. In this chapter, the method to read out the trimming values will be
given. The recommended calculation uses fixed point arithmetic and is given in chapter 4.2.3.
In high- , fixed-point code may not be well
supported. In this case the floating-point code in appendix 8.1 can be used as an alternative.
For 8-bit micro controllers, the variable size may be limited. In this case a simplified 32 bit
integer code with reduced accuracy is given in appendix 8.2.
4.2.1 Computational requirements
In the table below an overview is given for the number of clock cycles needed for compensation
on a 32 bit Cortex-M3 micro controller with GCC optimization level -O2. This controller does not
feature a floating point unit, thus all floating-point calculations are emulated. Floating point is
only recommended for PC application, where an FPU is present and these calculations are
performed drastically faster.