ts-7000
[Top] [All Lists]

[ts-7000] RTAI and DIO on the 7260

To:
Subject: [ts-7000] RTAI and DIO on the 7260
From: "jywmpg" <>
Date: Wed, 11 Apr 2007 14:37:28 -0000
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/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU