Software
AN4159
16/27
Doc ID 023639 Rev 3
6.2.4 Auto
mode
Some applications have an enable/measure/disable scheme. In such cases, it can be useful
to use the auto mode (CTRL1_REG ODN[1:0]). This way, the device runs measurements at
fixed time interval, and the application can get the latest measurement without latency.
6.2.5 SW
filtering
If higher precision is required, or if the air pressure/flow is unstable, a S/W filter could be
implemented on the sensor measurements.
While a classical moving average can be implemented as a simple solution it has some
drawback on the RAM usage and response time.
For more advanced filtering, pressure variation limiter can be implemented: using a fast
measuring rate (12 or 25 Hz rate), decide what is the maximum pressure variation between
2 successive measurement. Use this variation limit to dampen the high-frequency noise.
For indoor navigation when sub meter detection is required, a special recursive filter could
be used. Tailoring the S/W filter for the sensor characteristic and the application requirement
is usually a good move. Sensor fusion is the most advanced filtering which uses all available
information and uses them to reduce the positioning noise.
6.2.6 BOOT/SWRESET
bit
The boot bit can be used when the device is enabled to reinitialize the volatile registers from
internal non-volatile trimming memory. Follow this sequence:
1.
Turn on BOOT bit
2.
Wait BOOT bit self-clear (with S/W timeout)
3.
Wait an additional 5 msec
4.
Configure the registers
5.
Power up the device for normal use
The SWRESET bit resets all the other registers to their reset values and stops any internal
state machines.
6.2.7 Absolute
accuracy
The devices are trimmed at final test with a typical absolute accuracy of +/-2mb with no
external S/W pressure temperature compensation over the temperature range 0°C - 65°C,
after quadratic compensation
Reflow soldering may cause an additional spread of the device population, the spread is
PCB construction, assembly and layout specific.
Beware that normal sockets and board warping can cause absolute accuracy errors.
If very good absolute accuracy is needed, a 1 point calibration in the production line could
be implemented. Use a high precision barometer, and store in the application a S/W
compensation offset, which could also take into account ageing test results.
LPS331AP devices may have higher absolute accuracy by implementing an extra S/W
pressure temperature compensation algorithm, which is called “quadratic pressure
compensation in temperature”, and is described in this chapter.