Re: Buffer problems 2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 06 March 2004 02:17 pm, Frank Mori Hess wrote:
> On Friday 05 March 2004 10:17 am, AlbertoSechi_at_libero.it wrote:
> > Hi, i have this problem: i'm using cmd.c demo program in order to
> > acquire data from my NIDaqcard6062E, i use an ARM board, when i want
> > to acquire a number of samples greater than the internal buffer of the
> > card the output is zero (2048) for a number of times equal to the
> > number of reading of the entire buffer. For example if i want 5000
> > scan for only one channel the first 5000-4096 samples are zero and the
> > last 1804 are the right samples. It seems that hte buffer doesn't
> > discard old samples. How can I solve this problem????
> > I've seen that there are comedilib functions to manage buffer.
> > Thanks
> > Alberto.
>
> Would you update from cvs and see if it behaves any better?  I added a
> couple memory barriers to comedi/drivers.c, as the only explanation I
> can think of is that the data getting transferred by the interrupt using
> comedi_buf_memcpy_to() is getting stuck in a cache somewhere.

Duh, I found the problem in ni_mio_common.c.  The loop in ni_ai_fifo_read()
wasn't using the loop index when storing the data.

- -- 
Frank

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFASoe55vihyNWuA4URAqhqAJ0bDwUqEEVswgPCWuCefXExs1pDdQCgi7O6
GWmYXCyT/sc1DvLvu6IMqSg=
=ouEN
-----END PGP SIGNATURE-----

Received on 2004-03-07Z02:23:50