Memory mapped area of GPIO in raspberry pi
<p>I have real struggles with respective to understanding the data sheet part[BCM2835-ARM-Peripherals.pdf] where in which it talks about following:</p>

<p>Q1: Every gpio has 40 registers[refere: Table 6-1 GPIO Register Assignment] which are common for all gpios can be used to SET/CLEAR/GPFSEL[0-5] etc,but what is the purpose of GPIO function select register which has 10 FSEL (0-9) registers [refer: Table 6-2 – GPIO Alternate function select register 0].</p>

<p>Q2: How can I reach to a given GPIO through memorymapped region? , is something like below
Case#1 :GPIO4 with alternate function 5 as Input: 
as ( 4 &lt; 10) it will use "0x7E200000" with FSEL4 register[refer: Table 6-2 – GPIO Alternate function select register 0] having 000 and 010 = GPIO Pin 9 takes alternate function 5.</p>

<p>case#2 :GPIO27 with alternate function 3 as Output: 
as ( 27 &lt; 30) it will use "0x7E20000C" with FSEL3 register[refer: Table 6-2 – GPIO Alternate function select register 0] having 001 and 111 = GPIO Pin 9 takes alternate function 5.</p>

<p>Please let me know whether my understanding is correct or not?</p>

<p>Q3: what is the purpose of following tables</p>

<p>Table 6-3 – GPIO Alternate function select register 1
Table 6-4 – GPIO Alternate function select register 2
Table 6-5 – GPIO Alternate function select register 3
Table 6-6 – GPIO Alternate function select register 4
Table 6-7 – GPIO Alternate function select register 5</p>

<p>BR,
&amp;Sanumala</p>