Beaglebone: GPIO configuration at startup

Hello

I have some questions concerning the GPIOs of the beaglebone:

Is there somewhere a definition of the configuration of the GPIOs immediately at startup? (input / output / pullup / pulldown)

When using Angstrom, does the kernel changes this configuration during boot?

Is it possible to change the startup configuration of the GPIOs (before the kernel is loaded)?

If its not possible to change the startup configuration, does the current configuration remain the same for further revisions of the beaglebone?

Thanks a lot for any help!

Hello Rico,

I think it is my turn :slight_smile:

1.) you can find the definition of the configuration of the GPIO’s under:
/sys/kernel/debug/omap_mux/

for example if you want to learn the current configuration of the gpmc_ad6 pin
you should look for:

cat /sys/kernel/debug/omap_mux/gpmc_ad6

to make it availible for output you should write

echo 7 > /sys/kernel/debug/omap_mux/gpmc_ad6

and then if you want to use it you should export that pin.

echo 38 > /sys/class/gpio/export

after you exported it you can make it output

echo “out” > /sys/class/gpio/gpio38/direction

or input

echo “out” > /sys/class/gpio/gpio38/direction

you can change the output value as low:

echo “0” > /sys/class/gpio/gpio38/value

or as high

echo “0” > /sys/class/gpio/gpio38/value

you can find the manings of the numbers like 7 or 37 from the user guide of AM335X.

  1. As I know, normally first configuration is made by bootloader. (like mux.h) After bootloader, kernel changes the configuration as in the
    /sys/kernel/debug/omap_mux/ directory. Whatever you write here will be executed with kernel.

  2. I think you should edit u-boot’s pin mux configurations and recompile it.

  3. As I know there is no major pin config changes on revisions of Beaglebone.

Regards

2012/12/3 Rico <rico.cadetg@gmail.com>

Hello

I have some questions concerning the GPIOs of the beaglebone:

Is there somewhere a definition of the configuration of the GPIOs immediately at startup? (input / output / pullup / pulldown)

When using Angstrom, does the kernel changes this configuration during boot?

Is it possible to change the startup configuration of the GPIOs (before the kernel is loaded)?

If its not possible to change the startup configuration, does the current configuration remain the same for further revisions of the beaglebone?

Thanks a lot for any help!

Web: http://www.teknotel.com.tr

You can find detailed explanation in the links below, also:

http://www.nathandumont.com/node/250
http://akademii.blogspot.com/2012/02/beaglebone-gpio-testing.html
http://www.gigamegablog.com/2012/03/16/beaglebone-coding-101-buttons-and-pwm/

Regards

2012/12/4 özen özkaya <ozenozkaya@gmail.com>

I was looking into this issue some time ago. You can find default "from cold" pin configurations in the AM335x TRM, however you also have to take into account the changes u-boot makes and also the changes that the Linux kernel also makes. It's a tough chain to follow so you need some motivation to do it and also be prepared for changes to it in future revisions of software!

Regards,
Jack.

yes

Can I know what these pins are? I'm using a Beaglebone green