Hi all,
I am trying to use the RTAI extensions to control some DIO pins in a
hard real time process. I am new to RTAI and running into a problem
making this work
I have built and installed the RTAI extensions and run the latency
test from the test suite and get what appear to be reasonable results.
I am now trying to morph the latency test program into one that also
toggles a DIO bit twice a second with as low a max latency as possible.
I have updated the latency program to run at the desired interval, but
when I try to do the mmap to get access to the DIO pins, the system
crashes. I do this prior to making the mlockall call:
// get access to DIO pins
int fd = open("/dev/mem", O_RDWR);
unsigned char *start;
start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd,
0x80840000);
<rt mailbox and task init calls>
// lock all memory
mlockall(MCL_CURRENT | MCL_FUTURE);
Adding the above mmap call triggers the system crash. Removing it
(and all subsequent references) allows the program to run on the
desired schedule.
Any idea that am I doing wrong?
I need to figure out how to get more diagnostic info out before the
crash, but thought I would ask in case the problem was obvious to someone.
Regards,
jw
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|