7.1.1 IO_SetConfiguration Command and its Response

The IO_SetConfiguration command (0x60) configures the specified I/O pin with the selected settings:

The bPinSetting value includes the following bit fields:
  • Bit 7, Idle-State – valid only for an output pin
    • 0 → Idle state is Low
    • 1 → Idle state is High
  • Bit 6:5, AlertEdge – valid only for an alert pin
    • 00 → Alert/Interrupt disabled
    • 01 → Alert/Interrupt on falling edge
    • 10 → Alert/Interrupt on rising edge
    • 11 → Alert/Interrupt on both the edges
    ClkDiv – valid only for the CLKO pin
    • 00 → 6 MHz clock
    • 01 → 4 MHz clock
    • 10 → 2 MHz
    • 11 → 1 MHz
  • Bit 4, Open-Drain – valid only for an output pin
    • 0 → The pin is not a open-drain pin
    • 1 → The pin is a open-drain pin
  • Bit 3, PUSel – valid only for an input pin
    • 0 → The pin is not pulled up internally
    • 1 → The pin is pulled up internally
  • Bit 2, IODir
    • 0 → The pin is a output pin
    • 1 → The pin is a input pin
  • Bit 1:0, IODesignation – varies with the I/O pin selected
    • 00 → GPIO function
    • 01 → CTS/RTS/RXA/TXA/USBCFG/USBSPND function
    • 10 → CS3/CS2/CS1/I2CTO/CS0/SPIA function
    • 11 → Alert0/I2CA/Alert1/CLKO/Alert2/Alert3 function

This command is sent through Endpoint 0x04 (OUT). The response is read through Endpoint 0x84 (IN).

Table 7-2. IO_SetConfiguration - Command
Byte IndexCommandDescription
00x60Command codeConfigures the specified I/O pin
1

0x00

0x10

0x20

0x30

0x40

0x50

IONum: IO0

IO1

IO2

IO3

IO4

IO5

I/O number
2bPinSetnIOn setting register valueI/O setting register value for the selected pin
Table 7-3. IO_SetConfiguration - Response
Byte IndexResponseDescription
00x60Returns the command codeReturns whether the status of the command was accepted
10x20Accepted - successfulThe command is accepted and acted upon
0x60Rejected – invalid configuration The command rejected because the configuration is invalid
0x64Rejected – lockedThe command rejected because the device configurations are locked