www.8devices.com
|
|
Author |
Message |
bluespray
Joined: 26 May 2012, 01:19 Posts: 66
|
I got I2C working. Now, onto GPIO.
I'll need 4-5 GPIOs. Lokking at the pinout, the best candidates are those UART1 pins (25-32). What I've gathered from this forum is that only GPIO5 has been successfully working, and you have to use mmio to get it into GPIO mode.
My questions are:
1. Has anyone been able to get any other GPIO to work? 2. Is there a list of addresses (for use with mmio) for all of the available GPIOs?
|
18 Jun 2012, 04:50 |
|
|
Saulius
Joined: 08 Dec 2011, 09:35 Posts: 138
|
|
18 Jun 2012, 05:56 |
|
|
Sprite_tm
Joined: 25 Mar 2012, 17:37 Posts: 45
|
And I can confirm GPIO works just fine: I've been using some from the kernel as an one-wire interface and a GPIO-based SPI port, plus some from software, both as outputs and inputs. Never had problems with it.
|
18 Jun 2012, 09:51 |
|
|
bluespray
Joined: 26 May 2012, 01:19 Posts: 66
|
Which GPIO pins were you using?
|
18 Jun 2012, 14:29 |
|
|
Sprite_tm
Joined: 25 Mar 2012, 17:37 Posts: 45
|
I think I mostly used the ones that are shared with serial port 0.
|
18 Jun 2012, 19:06 |
|
|
bluespray
Joined: 26 May 2012, 01:19 Posts: 66
|
|
19 Jun 2012, 01:04 |
|
|
Sprite_tm
Joined: 25 Mar 2012, 17:37 Posts: 45
|
|
19 Jun 2012, 14:18 |
|
|
bluespray
Joined: 26 May 2012, 01:19 Posts: 66
|
Actually, it depends. From the kernel code and datasheet, GPIO 7-14 are shared between PCM, I2S, and UART0. They are reserved when you your kernel is compiled with PCM, I2S, etc. If you look at the file /sys/kernel/debug/gpio, you can see if they're claimed or not. Straight from the default kernel, setting gpioctl on some of these will result in error.
Any way, I've found a way to patch the kernel to claim them for my system. It's better for us this way.
|
19 Jun 2012, 22:26 |
|
|
Zodiac69
Joined: 10 Jul 2012, 07:10 Posts: 25
|
Hi All
Not sure if this has been done but, i am looking for a gpio to include a "Rotary Encoder". Did the "Google" thing and found a few but i do not see them as been available in the "Software" section.
I am new to Linux and have never compiled a package...but. If someone has a "Virtual Box" file and give me some pointers, i am willing to try.
Z69
|
17 Jul 2012, 09:11 |
|
|
dsuarezv
Joined: 09 Jan 2013, 08:20 Posts: 2
|
This is an old topic, but just in case someone else needs GPIO, I've written a little library that tries to resemble the arduino API for pin handling. It uses the GPIO registers on the RT3052 so it's pretty fast.
It's available here:
Cheers!
|
24 Jan 2013, 12:33 |
|
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|