Linux IIO development
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	"Mutanen, Mikko" <Mikko.Mutanen@fi.rohmeurope.com>
Subject: ROHM BM1390 support
Date: Tue, 30 May 2023 11:20:59 +0300	[thread overview]
Message-ID: <2e722c05-9548-f8da-2d72-1ba76a1e2508@gmail.com> (raw)

Hi dee Ho peeps,

Once again I am trying to learn from more experienced sensor folks :)

I am currently working (also) on ROHM BM1390 pressure sensor. The sensor 
can measure pressure ranging 300 - 1300 hPa. Measurement times can be 
around 20 - 160 mS depending on the amount of samples being averaged. 
There is also an IIR filter included in sensor with 3 different settings 
titled as "weak", "middle" and "strong". Unfortunately the exact maths 
is not explained. Furthermore, the sensor can be configured to store 
maximum of 4 measured pressure samples in a HW FIFO.

The sensor can also measure temperature and error for temperature 
measurement is told to be +/- 2C when temperature is in a range of 25 C 
- 85 C. On the other hand, operating temperature for the device is said 
to be -40 C - 85 C.

Now, the temperature measurements are not stored in a FIFO.

Here comes my question - what do you see as the typical use-cases for 
such a sensor? Or, to be more exact, do you think "quick" changes in 
temperature are expected to be measured with this type of sensor? I am 
asking this because I would like to support using the hardware FIFO and 
I am wondering if reading the temperature at FIFO flush and populating 
also the temperature channel values corresponding to all (up to 4) 
pressure measurements would be the best approach?

Other options is to not support using FIFO when temperature is scanned.

I have a gut feeling that the users who measure pressure are often also 
interested in getting the temperatures. Hence I would like to allow 
getting both. "Cheating" by using the same temperature value (measured 
when FIFO is flushed) should be Ok if temperature is not changing 
rapidly as even with the slowest measurement speed collecting 4 samples 
should finish in well under a second - and mentioned accuracy for the 
temperature sensor is such that small temperature changes are probably 
going unnoticed anyways.

Here I would love to have an opinion from more experienced IIO 
developers/users - and potentially a hint how similar sensors have been 
handled previously. (I would assume not storing some slowly changing 
values in a HW FIFO is quite common because HW FIFOs won't come without 
a cost).

Yours,
  -- Matti

Oh, in case someone wants to see the data sheet:
https://fscdn.rohm.com/en/products/databook/datasheet/ic/sensor/pressure/bm1390glv-z-e.pdf


-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~

             reply	other threads:[~2023-05-30  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30  8:20 Matti Vaittinen [this message]
2023-06-04 13:28 ` ROHM BM1390 support Jonathan Cameron
2023-06-05  6:56   ` Matti Vaittinen
2023-06-05 18:56     ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e722c05-9548-f8da-2d72-1ba76a1e2508@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=Mikko.Mutanen@fi.rohmeurope.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox