- From: Ong Wee Liat <g0202550_at_nus.edu.sg>
- Date: Thu, 14 Oct 2004 21:26:37 +0800
Hi Jan,
My basic program structure is like this
*some declarations*
.......
int main (void)
{
printf (" START!!!\n");//to print out a comment once program starts
*definitions of variable*
...
....
*definitions of comedi_cmd structure*
cmd.subdev = 0;
....
....
....
chanlist[0] = CR_PACK(0,0,0); //using channel 0, range 0 and aref 0
comedi_command_test(dev,&cmd);
*some error and printing processes*
...
...
//comedi_command(dev,&cmd); // this command is commented out
*some error and printing processes*
...
....
}
If i run the above, i can get a "success" from comedi_command_test( ) with the output as below.
START!!! <= from the printf command at the start of the main ( )
start: now 0
scan_begin: timer 1000000 (ns)
convert: timer 5000 (ns)
scan_end: count 1
stop: count 200
comedi command test returned 0 (success)
If i activate the comedi_command ( ) (uncomment the comedi_command(dev,&cmd) ), my program hangs IMMEDIATELY. I cannot even get into the main( ) as START!!! is not printed. The program hangs at the terminal.
This is strange as i am able to use comedi_data_read and comedi_dio commands without any problem.
I wonder if there might be any timing issue? driver issue? or my linux OS issue? I know it is kinda hard to debug but may be someone has some idea on how to start or encountered this before?
Thanks a lot
wee
Received on 2004-10-14Z12:26:37