public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* TI tsadc sample frequency question
@ 2015-05-27  0:17 Greg Wilson-Lindberg
  2015-06-14 14:29 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Wilson-Lindberg @ 2015-05-27  0:17 UTC (permalink / raw)
  To: linux-iio@vger.kernel.org

This probably falls closer to a stupid user question, but I can't seem to find it addressed in any of the documentation that I have found so far.

As a partial work around for the TS TSADC problems that are being discussed in another thread I'm enabling a buffer for a short time, pulling the samples, and disabling the buffer. I'm trying to understand the number of samples that will actually be collected during the time that I have the buffer enabled.

I'm currently enabling the buffer for 0.1 seconds, according to the mfd/ti_am335x_tsadc.h file a single sample takes 116us to process, so 6 samples (4 ts + 2 adc) should take 696us, or ~1436 sample sets per second, or ~143 samples per 0.1 seconds.

No matter what size I set the buffer to, I get that number of samples back. So even though I should only be able to collect ~143 samples, if I set the buffer size to 256, I get 256 samples back.

Is there some way (low overhead preferable) to reset the buffer so that I only get the samples that have been collected in the time that the buffer has been enabled? Or is there some way to figure out what the number of samples are the I would get back in some time period, so I can set the buffer size accordingly?
 
Greg Wilson-Lindberg
Sakura Finetek
310-783-5075

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-14 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27  0:17 TI tsadc sample frequency question Greg Wilson-Lindberg
2015-06-14 14:29 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox