Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
May 20, 2012, 01:37:49 AM
News: Glomation introduces new GECM-9G25 SODIMM system on module
Pages: [1]
Topic Tools  
Read April 03, 2011, 03:14:00 AM #0
jcochi2

Help GPIO

Hi, I'm a beginner in embedded systems, I found this exampleuse the gpio , butI get an error when mapping with the mmap function . use attached files. but I can pass the full basic code gpio use.

* at91sam9260.h (260.11 KB - downloaded 47 times.)
* prueba5.c (2.87 KB - downloaded 55 times.)
 
Read July 28, 2011, 08:25:28 AM #1
AwareWolf

Re: Help GPIO

I'm getting the same error; I hope someone out there has the solution!

BTW, what do you mean when you say "but I can pass the full basic code gpio use"?
 
Read July 28, 2011, 05:25:31 PM #2
admin

Re: Help GPIO

Access hardware register directly from user space applicaton is not recommended unless it is absolutely sure the Linux kernel will never touch those egisters.  Please upgrade to Linux 2.6.30 and up with built-in GPIO driver.  Examples of using the GPIO driver can be found here, https://www.ridgerun.com/developer/wiki/index.php/How_to_use_GPIO_signals
 
Read August 01, 2011, 07:11:50 AM #3
AwareWolf

Re: Help GPIO

Do you have instructions, links, etc. for upgrading the Linux kernel?
 
Read August 01, 2011, 08:29:43 AM #4
admin

Re: Help GPIO

The user's manual should have a section describe how to write the kernel to the FLASH.
 
Read August 01, 2011, 01:09:25 PM #5
AwareWolf

Re: Help GPIO

OK, but that assumes I have a kernel that's ready to be written. How do I go about getting that kernel in the first place? I'm thinking I need to :

Download the kernel source code
Download the patch for the Glomation board
Build the kernel

Is that right?

Sorry, these are probably pretty basic concepts but I'm new to Linux.
 
Read August 01, 2011, 03:25:42 PM #6
admin

Re: Help GPIO

Detailed instructions on how to build kernel image from source can be found at www.linux4sam.org.  The kernel image built for Atmel evaluation board can be directly used on Glomation boards.
 
Read August 02, 2011, 08:21:56 AM #7
AwareWolf

Re: Help GPIO

I followed your link to www.linux4sam.org. I found what I think is the appropriate pre-built kernel for the 9260S board: linux-2.6.30-at91-exp.3-at91sam9260ek.bin

I put that into my tftp directory. I booted my 9260S board and got to the u-boot prompt. I set the autostart variable to "yes". I used this command to try and start the kernel:

tftpboot 0x21800000 linux-2.6.30-at91-exp.3-at91sam9260ek.bin

All that happened was the file was copied over to the board, then I got a message "Starting kernel...", then nothing.

Do I have the right file? What else am I doing wrong?
 
Pages: [1]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re