GPIO access via Memory Mapping (Missing Addresses)

Moderators: odroid, mdrjr

GPIO access via Memory Mapping (Missing Addresses)

Unread postby Detonar » Thu Sep 20, 2018 3:35 pm

Hi,

I am developing an time-critical application for odroid xu4 which conmmunicates with it's environment via GPIO. Because SysFS might be to slow i want to use memory mapping to access these.
However, the most useful information about gpio register addresses of the xu4 i found is this page on the wiki: https://wiki.odroid.com/odroid-xu4/software/gpio_register_map

But there are only GPX1, GPX2, GPX3, GPA2 and GPB3 listed there. I need to use all GPIOs available on the CON10 and CON11 headers. These include GPA0 and GPZ in addition to the ones listed in the wiki.
I've got the names of the gpios on these headers from here https://wiki.odroid.com/odroid-xu4/hardware/expansion_connectors

I hope someone can help and show me how to get the missing register addresses.
Detonar
 
Posts: 2
Joined: Thu Sep 20, 2018 3:24 pm
languages_spoken: english, german
ODROIDs: XU4

Re: GPIO access via Memory Mapping (Missing Addresses)

Unread postby joshua.yang » Fri Sep 21, 2018 2:32 pm

GPA0 and GPZ descriptions here.

GPA0
Base address: 0x1401_0000
Offsets
- GPA0CON[3:0, ..., 31:28]: 0x0000 (0x0 = Input, 0x1 = Output, 0x2 = Reserved, 0x3 = Reserved, 0x4 to 0xE = Reserved, 0xF = EXT_INT1)
- GPA0DAT[7:0]: 0x0004
- GPA0PUD[2n+1:2n]: 0x0008 (Reset value 0x5555, 0x0 = Disables pull-up/down, 0x1 = Enables pull-down, 0x2 = Reserved, 0x3 = Enables pull-up)

GPZ
Base address: 0x0386_0000
Offsets
- GPZCON[3:0, ..., 27:24] (31:28 Reserved): 0x0000 (0x0 = Input, 0x1 = Output, 0x2 = Reserved, 0x3 = Reserved, 0x4 to 0xE = Reserved, 0xF = EXT_INT50)
- GPZDAT[6:0]: 0x0004
- GPZPUD[2n+1:2n]: 0x0008 (Reset value 0x1555) (0x0 = Disables pull-up/down, 0x1 = Enables pull-down, 0x2 = Reserved, 0x3 = Enables pull-up)

And I've updated the Wiki page :)
joshua.yang
 
Posts: 107
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: English
ODROIDs: XU4, XU4Q + Cloudshell2

Re: GPIO access via Memory Mapping (Missing Addresses)

Unread postby Detonar » Thu Sep 27, 2018 2:34 pm

Thanks a lot!
Detonar
 
Posts: 2
Joined: Thu Sep 20, 2018 3:24 pm
languages_spoken: english, german
ODROIDs: XU4


Return to Hardware and peripherals

Who is online

Users browsing this forum: Bing [Bot] and 3 guests