The set command allows the input and output control of the following modem
General-Purpose Input/Output (GPIO) pins: SIM_INT,
SIM_RST, SIM_CLK, SIM_IO,
COEX0, COEX1, and COEX2.
Syntax:
%XGPIOTEST=<direction>,<mask>,<pin_ctrl>
The set command parameters and their defined values are the following:
- <direction>
- 0 – Output
- 1 – Input
- <mask>
- Bitmask for pins to control.
- 1 bit per pin in ascending pin order starting from bit 0.
- Control for some pins is possible only in input or output direction. The allowed pin
control directions and bit positions are the following:
- SIM_INT – Input, LSB
- SIM_RST – Output
- SIM_CLK – Output
- SIM_IO – Input/Output
- COEX0 – Input/Output
- COEX1 – Output
- COEX2 – Input/Output, MSB
- <pin_ctrl>
- Bits for controlling each masked pin. If <direction> is output, 1 sets the pin high and 0 sets the pin low. If <direction> is input, 1 needs to be set for each pin whose state is read.
- Control for some pins is allowed as either input or output. The allowed pin control
directions and bit positions are the following:
- SIM_INT – Input, LSB
- SIM_RST – Output
- SIM_CLK – Output
- SIM_IO – Input/Output
- COEX0 – Input/Output
- COEX1 – Output
- COEX2 – Input/Output, MSB
The following command example configures all pins as output and sets their state low:
AT%XGPIOTEST=0,127,0
%XGPIOTEST:
OK
The following command example sets all pins as input and reads the pin state of each
pin:
AT%XGPIOTEST=1,127,127
%XGPIOTEST: 0x9
OK