9 gpio management, 1 gpio config command, Gpio management – Maxim Integrated 73M1822/73M1922 Modem CTL Application User Manual

Page 16: Gpio config command

Advertising
background image

73M1822/73M1922 Modem CTL Application User Guide

UG_1x22_056

16

Rev. 1.0

2.9 GPIO Management

The Modem CTL provides three commands for managing the GPIO:

1. Config – configures the GPIO pin for operation.

2. Control – enable/disable the GPIO pin.

3. Data – accessing GPIO data.

2.9.1 GPIO Config Command

The GPIO pin must be configured properly before it can be used. Using this command the user can
display the GPIO configuration (GET), or configure the GPIO pin for the desired operation (SET).
Configuring the GPIO is simple, it requires only up to two parameters:

1. Signal direction (input or output).

2. If configured as input the GPIO will generate interrupt upon rising or falling edge signal – this

parameter selects the edge transition. For output direction this parameter is not relevant.


Syntax (GET)

1X22CTL:NN> gpio config get gpioX

Where:

gpioX gpio4,

gpio5, gpio6, or gpio7.

NN

Shows the current active channel ID.


Syntax (SET)

1X22CTL:NN> gpio config set gpioX [input|output] [rising|falling]

Where:

gpioX gpio4,

gpio5, gpio6, or gpio7.

NN

Shows the current active channel ID.

The following is a log of the gpio config commands.










Figure 14: GPIO Config GET/SET Command Logging Session

Modem CTL:00> gpio config get gpio5

GPIO-5:

Status : DISABLE

Direction: INPUT

Polarity : FALLING

Modem CTL:00> gpio config set gpio6 input rising

Display configuration for GPIO5.

GPIO5 configured as input, interrupt
triggered on falling edge. The GPIO is
current disabled.

Configure GPIO6 as input,
with rising edge triggered.

Advertising