Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am interested to know how we can find out at which address are my hardware registers mapped on "/dev/mem".

Suppose if someone am interested to control GPIO using mmap command.


This link tell the mapping directly, but does not tell how can we find at what address does mapping for hardware devices starts ?

Please suggest on this point.

Any reply will be appreciable.


share|improve this question
Have you looked into this question? – Sai Nov 24 '12 at 15:31
Here is another interesting question about it. – Jivings Nov 25 '12 at 8:29

The code you reference is using the following to address the GPIO controller.

// Access from ARM Running Linux

#define BCM2708_PERI_BASE        0x20000000
#define GPIO_BASE                (BCM2708_PERI_BASE + 0x200000) /* GPIO controller */

The GPIO base address is 0x20200000

The code maps this address to an allocated piece of RAM (i.e. a buffer).

share|improve this answer
but data sheet says ;-- – apple Nov 25 '12 at 6:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.