Memory, RTC & Bus Control

Microchip MCP23017 in the datasheet corpus

16-bit I2C GPIO port expander with per-pin direction, pull-ups and interrupt-on-change.

standing: provisionalI2C0x20-0x27 (A2:A0 pins, up to 1.7 MHz)
VendorMicrochipMemory, RTC & Bus Control
InterfaceI2C0x20-0x27 (A2:A0 pins, up to 1.7 MHz)
Record StatusCatalog profileDatasheet / behavioral twin

Driver oracle & capability record

Indexed in the CircuitTwin datasheet corpus (gpio-led-pwm class); supports both IOCON.BANK=0 and BANK=1 address maps.

Driver referenceZephyr microchip,mcp230xx / Adafruit MCP23017
Evidence standingprovisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples).
Published recordGenerate or inspect locally via ct twin generate (see /docs/twin-generation).

Key registers & reset values

Address / FieldRegisterReset / ExpectedPurpose
0x00 / 0x01IODIRA / IODIRB0xFF (all inputs)Port A and Port B pin direction masks (BANK=0)
0x0C / 0x0DGPPUA / GPPUB0x00100 kOhm internal pull-up enable per pin
0x12 / 0x13GPIOA / GPIOBPin statePort read/write registers
0x0E-0x11INTFA..INTCAPBLatched stateInterrupt flag and captured pin state on change

Attach with ct CLI

Shell - run firmware with MCP23017
# Run compiled firmware with MCP23017 attached on nucleo-f446re
ct run --json --board nucleo-f446re --device mcp23017 build/app.elf

# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/mcp23017.xml tests/mcp23017-fault.suite.yaml

Fault-injection test snippet (suite.yaml)

tests/mcp23017-fault.suite.yaml
version: 1
board: nucleo-f446re
firmware: build/app.elf
tests:
  - name: mcp23017-i2c-nack-recovery
    faults:
      - at_ms: 30
        bus: I2C1
        kind: nack
        address: 0x20
        count: 2
      - at_ms: 140
        part: mcp23017
        kind: register_override
        register: 0x00
        value: 0xFF
    expect:
      console_contains: "DRIVER_FAULT_HANDLED"
      exit_code: 0

Compatible board twins

More in Memory, RTC & Bus Control