Search by Tags

GPIO config block settings


Compare with Revision

Subscribe for this article updates

It is possible to choose the state of a GPIO while the OS is booting on Colibri PXA and Colibri Vybrid modules.

The settings are saved in the Config Block. You can edit the Config Block directly in the Bootloader, or you can use the GPIOConfig tool to do those settings (PXA modules only).

Config Block Settings


gpio.gpdr0:     0x00000000      (GPIO Direction ( 31: 0) 0=In 1=Out)
gpio.gpdr1:     0x00000000      (GPIO Direction ( 63:32) 0=In 1=Out)
gpio.gpdr2:     0x00000000      (GPIO Direction ( 95:64) 0=In 1=Out)
gpio.gpdr3:     0x00000000      (GPIO Direction (120:96) 0=In 1=Out)
gpio.gplr0:     0x00000000      (GPIO Level ( 31: 0))
gpio.gplr1:     0x00000000      (GPIO Level ( 63:32))
gpio.gplr2:     0x00000000      (GPIO Level ( 95:64))
gpio.gplr3:     0x00000000      (GPIO Level (120:96))


Since version 1.1 of the bootloader, you can use the set command to configure GPIOs on Vybrid:

set gpio.XX.<paramer>=<value>

XX is the GPIO number. Valid index range is 0-133. Check Vybrid's reference manual and the VFXX module datasheet for more information about pin numbers and their usage. Parameters and corresponding values can be found in the following table:

gpio.XX.ctrl:  0               (Enables configuration of pin at boot 0/1)
gpio.XX.ode:   0               (0 CMOS 1 Open drain)
gpio.XX.dse:   0               (drive strength 0=150Ohm ... 7=20Ohm)
gpio.XX.pus:   0               (0 100k down 1 47k up 2 100k up 3 22k up)
gpio.XX.pke:   0               (Enables pull/keeper 0/1)
gpio.XX.pue:   0               (0=keeper 1=pull)
gpio.XX.obe:   0               (Output enable 0/1)
gpio.XX.ibe:   0               (Input enable 0/1)
gpio.XX.state: 0               (GPIO pin state 0/1)

Parameters are applied to a pin only if the ctrl parameter is set to 1. For example to configure pin SO-DIMM 71 to be high at boot you have to use the following commands to enable control of the pin, set it to output, configure data strenght (dse=0 disables the pin) and the state:

>set gpio.41.ctrl=1

>set gpio.41.obe=1

>set gpio.41.dse=1

>set gpio.41.state=1

>save gpio
Finding bootargs block...
Writing 5 sector(s) of bootargs data from sector 320.

Tegra and iMX7

The GPIO configuration in the Bootloader was added in Image V2.0 beta 4 (Tegra) and V0.1 beta 2 (iMX7). All modifications to the default reset configuration is done in one single string.

gpio.bootconf         (Boot GPIO settings. Do not remove default config. (Max 1536 chars))

The string uses the same syntax as it is also used by the libraries to store GPIO settings in the registry. You find the details CHM Help of the libraries boundle in the section GPIO Configuration Options.

Warning: Only append your configuration to the default configuration other than you are sure what you are modifying.

Here some samples in order to better understand the bootconf setting:

Example setup with GPIOs:

  • L3 (91): GPIO output, level high, detristated, pull up
  • L4 (92): GPIO input, detristated, normal

The alphanumeric to numeric mapping is documented here.

Configuration string (removed the default config to simplify the example)

set gpio.bootconf = "[gpio_91] altfn=-1 dir=out lvl=1 pull=up outmode=std [gpio_92] altfn=-1 dir=in outmode=std pull=none"
save gpio

Example setup with SODIMM:

  • SODIMM 55: Function SPI3_MOSI
set gpio.bootconf = "[colibripin_55] altfn=3"
save gpio

Note: On a Apalis module you would use "apalispin_xyz".