Skip to main content

GPIO config block settings

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

PXA

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

Vybrid ( Image version up to 1.5beta2 )

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=disabled, 1=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.45.ctrl=1
>set gpio.45.obe=1
>set gpio.45.dse=1
>set gpio.45.state=1
>save gpio
Finding bootargs block...
Writing 5 sector(s) of bootargs data from sector 320.

Tegra, iMX7 and Vybrid

The GPIO configuration in the Bootloader was added:

  • Image V2.0 beta 4 (Tegra)

  • V0.1 beta 2 (iMX7).

  • 1.5b4 (Vybrid)

All modifications to the default reset configuration is done in one single string.

gpio.bootconf <STRING>        (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.

caution

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

To view the default configuration

  • first clear the bootconf setting (not required on a factory new module)
  • display the current bootconf setting.
clear gpio
set gpio

On VF50/VF61 (as of V1.5b4) and iMX7, the default bootconf setting is empty. Therefore the warning stated above is not relevant.

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
danger

"outmode" is not supoorted on Colibri iMX7D.

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



iMX6

You can use the set command to configure SODIMM/MXM3 pins on iMX6:

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

XX is the SODIMM/MXM3 pin number (depending if you are running on Colibri or Apalis module). Valid index range is 0-199 for Colibri and 0-299 for Apalis.

Check iMX6 reference manual and the iMX6 modules datasheet for more information about pin numbers and their usage. Parameters and corresponding values can be found in the following table:

pin.XX.ctrl:       0               (Enables configuration of pin at boot)
pin.XX.direction: 0 (0 input 1 output)
pin.XX.level: 0 (0 low 1 high)
pin.XX.pull: 0 (0 don't change 1 none 2 up 3 down 4 up22k 5 up47k 6 up100k 7 down100k 8 buskeep)
pin.XX.strength: 0 (0 don't change 1 none 2 260ohm 3 130ohm 4 90ohm 5 60ohm 6 50ohm 7 40ohm 8 33ohm)
pin.XX.outmode: 0 (0 don't change 1 standard (push/pull) 2 open drain)

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 strength and the logical level:

>set pin.71.ctrl=1
>set pin.71.direction=1
>set pin.71.strenght=4
>set pin.71.level=1
>save pin
info

Check all fields of a pin. 0 is not always the default value for all pin fields.



Send Feedback!