0

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.

http://elinux.org/RPi_Low-level_peripherals#GPIO_Driving_Example_.28C.29

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.

Regards.

asked Nov 24, 2012 at 13:53
2
  • Have you looked into this question? Commented Nov 24, 2012 at 15:31
  • Here is another interesting question about it. Commented Nov 25, 2012 at 8:29

1 Answer 1

2

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).

answered Nov 24, 2012 at 22:36
1
  • but data sheet says ;-- Commented Nov 25, 2012 at 6:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.