- From: Daniel Koch <danielkoch_at_gmx.net>
- Date: Thu, 21 Nov 2002 15:00:56 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I`m having the same problems with your old PC104-DAS16jr/16 card when
collecting data at high Hz rates (100KHZ). As I was told by Frank it seems to
be a buggy DMA controller on your PC`s board (e.g. there is a bug within the
NS Geode controller). I'm using an ALI chipset, but it seems to be buggy
also. You may try the timer mode option provided by the das16 driver by
using e.g.
comedi_config /dev/comedi0 your_driver your_io,,your_dma,,,,,1. (Look at the
das16.c code for proper use).
I also got a patch from RomanFietze for the das16 driver which modifies the
timing so that DMA is filled up not more than 50% for the fastest DAC. I
haven`t checked it out yet...will try tomorrow and tell you if it works for
me. Here is that patch:
#define MINIMUM_TIMER_PERIOD (HZ / 15) // 0.6s
#define MAXIMUM_TIMER_PERIOD (HZ / 2) // half a second
...
// utility function to suggest timer period in jiffies in timer mode
static unsigned int das16_suggest_timer_period(comedi_device *dev, comedi_cmd
cmd)
{
unsigned int period = 0;
if (cmd.convert_src == TRIG_TIMER)
{
// fill up DMA no more than 50% for fastest DAC
period = (HZ * (unsigned long)cmd.convert_arg) / 100000;
}
if (period < MINIMUM_TIMER_PERIOD)
period = MINIMUM_TIMER_PERIOD;
else if (period > MAXIMUM_TIMER_PERIOD)
period = MAXIMUM_TIMER_PERIOD;
DEBUG_PRINT("period = %u\n", period);
return period;
}
Your mileage may vary.
BTW, Frank, I already tried sending the data directly to a file but then I got
several buffer underuns before I get a final buffer overflow... This happens
when I set the buffer to the maximum size. If set the buffer too small then I
get a simple buffer overflow.
Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE93Och6i7okj1aOg0RAtx3AKDYQ7Qwkgi4GOVQ+5XKOYo1iRNbrACfULlc
yZDYbe8u33TlFl55Njh/1a8=
=9u7v
-----END PGP SIGNATURE-----
Received on 2002-11-21Z14:00:56