On 7/13/2015 10:11 AM, Babak akbari wrote:
> Hello
> 
> In AM335x (TRM) I have read that every pin has 8 different modes,each pin 
> has specific register like (conf_gpmc_ad0) that you can change the pin mux 
> mode from [0:7] . There are specific offsets for the pins from the base 
> address ((0x44E1_0000) region name (Control Module))
> I am able to read these registers correctly but my problem is in changing 
> the value of these registers.

The pinmux registers are protected by the Linux kernel and cannot be
written to by normal user code.  You either need to properly configure
the registers using device-tree bindings or circumvent the
restrictions (ie: by doing something like directly writing the pinmux
register with the PRU, which has direct hardware access and doesn't go
through the ARM side page map tables).

Note there is a "bone-pinmux-helper" driver which was written to allow
easy user-mode changing of the pinmux registers via sysfs.  See the
universal overlay (and the accompanying config-pin script) for an
example of usage:

https://github.com/cdsteinkuehler/beaglebone-universal-io

-- 
Charles Steinkuehler
[email protected]

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to