Peripherals - PRELIMINARY¶
The XPort EDGE Embedded Ethernet Gateway provides configurable software controls for peripheral devices connected to general purpose input output pins (GPIOs). Peripheral devices are commonly connected via GPIOs or I2C, SPI, or SDIO interfaces, include sensors, buttons, and LEDs.
Configurable Pin Manager¶
The Configurable Pin Manager (CPM) allows you to assign and control the configurable pins (CPs) available on the gateway.
Configuring a CP¶
The CPM configuration contains two parts: a configurable pin (CP) that contains status settings, and a configurable pin role (CP Role) that defines and maps the CP functionality.
To define the CP settings, set the available CP Status properties. These include the input/output mode, assert, mode, and value. For a description, see CP Status Settings.
Next, enable the CP Role and assign it to a particular CP. For a description of the available CP Roles, see Configurable Pin Roles.
To configure a CP:
In Web Manager, go to CPM > CPs and CPM > Roles > Configuration.
For the CLI, see Config CPM level and Config CPM Role level.
For XML, see configgroup CPM.
Notes:
- Some CPs may be reserved for specific Roles, while other pins can be configurable for general input or output.
- A Role, when enabled, can trigger outside events.
- You can assign a CP to more than one role, and the CP can be defined as Input in one role but as Output in another role.
- You can only enable one role for a particular CP at a time.
- To modify a CP, you need to first disable all Roles in which it is a member.
- When a CP Role is saved, its CP settings are saved with it.
Configurable Pin Roles¶
The following Roles can be assigned to configurable pins:
Role Name | Description |
---|---|
Role Factory Defaults | Resets the configuration to factory defaults. |
Role HTTP Server Trigger | Turns on HTTP Server if Mode is "Triggered." |
Role Line 1 DSR | Line 1 DSR is read by application. |
Role Line 1 DTR | Line 1 DTR is set by application. |
Role Line 1 Flow.CTS | Allows sending if Flow Control is "Hardware." |
Role Line 1 Flow.RTS | Allows receiving if Flow Control is "Hardware." |
Role User Data Updated | User Data Updated is active when user data changes, until Acknowledge action. |
Note: Role User Data Updated refers to the User Data module, which allows you to define custom configurable data for the Web UI. It provides a hardware signal indicating that a Web user has changed at least one of the User Data items. To clear this signal, use the CLI command:
status Custom > Acknowledge
. See Status Custom level.
CP Roles Configuration Settings¶
The following table describes the Web Manager CP Roles configuration settings.
Links to the equivalent settings for the CLI and XML reference are listed below.
CLI settings: See Config CPM Role level
XML settings: See configgroup cpm
Role Setting | Description |
---|---|
CP | Number of the configurable pin assigned to this role. Enter 0 or blank the field to revert to <No CP Selected>. |
State | Role state. Enabled allows the application to use the designated pin. Some roles (those containing a period <.>) are bundled into a group. Enabling or disabling a grouped role also enables or disables the rest of the roles in the same group. |
Assert | Polarity of the CP role. Choices are: High or Low. High - Logical "1" corresponds to a voltage high condition on the pin. Low - Logical "1" corresponds to a voltage low condition on the pin. |
Mode | Pin Mode. Push-Pull or Weak Pullup. In order to sustain a voltage higher than VDD+0.3, the Mode must be set to Push-Pull. |
Configurable Pin Status¶
The CP Status settings define the current status and properties for a CP.
CP Status Settings¶
The following table describes the Web Manager CP Status configuration settings.
Links to the equivalent settings for the CLI and XML reference are listed below.
CLI settings: See Status CPM CPs level
XML settings: Run the CLI command xsr dump cpm cps
from the Status level to view CP Status settings.
CP Status Setting | Description |
---|---|
Ref | Pin number on the device that corresponds to this configurable pin. |
Usage | Usage. Reserved: reserved for assignment to a particular role. Input: input pin Output: output pin Unused: pin is not assigned for use. |
Assert | Logical polarity of this pin. High means that a logical "1" corresponds to a voltage high condition on the pin. Low means that a logical "1" corresponds to a voltage low condition on the pin. |
Mode | Mode. Choices are: Push-Pull or Weak Pullup mode. In order to sustain a voltage higher than VDD+0.3, the Mode must be set to Push-Pull. |
Value | Value is the logical value of the configurable pin. Its polarity depends on its assert. Choices are: 0 or 1. 0 represents "not assserted." 1 represents "asserted." |
Roles | The number of pin roles that refer to this pin. |
Active in Role | The current active role that uses this pin. Displays <available> if not assigned. |