Linux IIO development
 help / color / mirror / Atom feed
From: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <noname.nuno@gmail.com>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH v2 1/3] iio: adc: ad7124: Fix 3dB filter frequency reading
Date: Mon, 31 Mar 2025 11:40:44 -0300	[thread overview]
Message-ID: <Z-qpbInHvb3PjMiu@debian-BULLSEYE-live-builder-AMD64> (raw)
In-Reply-To: <p23r6fxfbbgszqaew42dby5yjwio4xipdh3y47rr3wbso6fwcb@ej7ut3sruzoa>

On 03/31, Uwe Kleine-König wrote:
> Hello,
> 
> On Wed, Mar 26, 2025 at 03:20:24PM -0300, Marcelo Schmitt wrote:
> > Hello,
> > 
> > On 03/17, Uwe Kleine-König wrote:
> > > The sinc4 filter has a factor 0.23 between Output Data Rate and f_{3dB}
> > > and for sinc3 the factor is 0.272 according to the data sheets for
> > > ad7124-4 (Rev. E.) and ad7124-8 (Rev. F).
> > 
> > Potentially dumb question but, how do we get to these factors between ODR and
> > 3dB frequency?
> > Looking at Table 8, Table 18, Table 28, and 
> > dividing values from Output Data Rate (SPS) column by respective
> > values from f3dB (Hz) column gives me 4.3478.
> 
> Using the datasheet for AD7124-4 Rev. E in Table 8 we have for example:
> 
> 	ODR = 19200 SPS
> 	f_{3dB} = 4416 Hz
> 
> So it's either multiplying with 0.23 (as does my patch) or dividing by
> 4.3478260869565215 (as you found).

Got it. Thanks for clarifying that out.

> 
> But having said that, a definitive formula would be nice instead of
> guessing that there is a linear correlation between the columns and
> determining the factor yourself. Note that in Table 10 the f_{3dB} value
> corresponding to ODR = 15 SPS should be 4.08 Hz. The 5.44 Hz specified
> there would be the right value for ODR = 20 SPS which is a value that
> occurs in Tables 8 and 9, but not 10. :-\

I see. Yeah, I feel like datasheets are similar to device drivers in the sense
that they tend to get better over time. datasheets for newer parts often have
more information and better explanations compared to old ones. Anyways,

Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com>

Thanks,
Marcelo

  reply	other threads:[~2025-03-31 14:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 11:52 [PATCH v2 0/3] iio: adc: ad7124: Fix 3dB filter frequency reading Uwe Kleine-König
2025-03-17 11:52 ` [PATCH v2 1/3] " Uwe Kleine-König
2025-03-26 18:20   ` Marcelo Schmitt
2025-03-31 13:38     ` Uwe Kleine-König
2025-03-31 14:40       ` Marcelo Schmitt [this message]
2025-03-17 11:52 ` [PATCH v2 2/3] iio: adc: ad7124: Remove ability to write filter_low_pass_3db_frequency Uwe Kleine-König
2025-03-26 18:35   ` Marcelo Schmitt
2025-03-31  9:53     ` Jonathan Cameron
2025-03-17 11:52 ` [PATCH v2 3/3] iio: adc: ad7124: Make register naming consistent Uwe Kleine-König
2025-03-17 19:00 ` [PATCH v2 0/3] iio: adc: ad7124: Fix 3dB filter frequency reading Jonathan Cameron
2025-03-24  9:44   ` Uwe Kleine-König
2025-03-31 10:02     ` Jonathan Cameron
2025-04-06 10:54       ` 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=Z-qpbInHvb3PjMiu@debian-BULLSEYE-live-builder-AMD64 \
    --to=marcelo.schmitt1@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=noname.nuno@gmail.com \
    --cc=u.kleine-koenig@baylibre.com \
    /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