ts-7000
[Top] [All Lists]

Re: [ts-7000] RTAI and DIO on the 7260

To:
Subject: Re: [ts-7000] RTAI and DIO on the 7260
From:
Date: Wed, 11 Apr 2007 10:13:05 -0500

I use 'O_RDWR | O_SYNC' in the open statement
e.g.        int fd = open( "/dev/mem", O_RDWR | O_SYNC) ;

Also try taking out the call to mlockall.. perhaps you have not properly set up the required memory before the call.


wrote on 04/11/2007 09:37:28 AM:

> 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/
>  
__._,_.___


SPONSORED LINKS
Single board computer Hardware Computer running slow
Linux os Single board

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<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