On Fri, Feb 20, 2009 at 4:40 PM, Dave Hylands <dhylands@gmail.com> wrote:
Hi Felipe,

> Is there any way to directly access the PXA270 registers from the user
> space?
> I am writing a real-time application using Xenomai and I need to have access
> to the UARTs, bypassing the kernel entirely in order to keep the latencies
> low.

You can mmap any of the registers in. I'm not sure how successfull
your attempts will be. Note that while you'll be able to access the
registers from user space, you won't be able to write interrupt
handlers.

See the pxaregs program for examples of using mmap to map int the
registers directly.

If you're going directly to the HW, you'll need to disable the kernel
drivers so that they don't try to access the registers at the same
time.

I did try to do so without success - but my kernel drivers were enabled. I will try to disable them and see what happens.
 


> I tried to write an application that reads/writes directly to the proper
> registers (based on the program found at
> http://docswiki.gumstix.com/index.php/Sample_code/C/gpregs), yet I can't get
> a proper reading from the said UART.

If you didn't disable the kernel drivers, then they'll be sucking up
the characters before your user mode program can get to them (there's
no way user mode will beat the interrupt handler). The context
switching overhead will (I believe) make accessing registers directly
less efficiently than can be done from kernel space.

Hm.. it seems them that maybe writing a real-time driver for the UARTs is the way to go than - it should keep my latencies lower.

Thanks for the help, Dave! BTW, if anyone is interested, the idea is to make it communicate with a Bioloid humanoid robot in real-time, so it can do the motion planning/balance control in real time.
 

--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users