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.
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 reference | Zephyr microchip,mcp230xx / Adafruit MCP23017 |
|---|---|
| Evidence standing | provisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples). |
| Published record | Generate or inspect locally via ct twin generate (see /docs/twin-generation). |
Key registers & reset values
| Address / Field | Register | Reset / Expected | Purpose |
|---|---|---|---|
0x00 / 0x01 | IODIRA / IODIRB | 0xFF (all inputs) | Port A and Port B pin direction masks (BANK=0) |
0x0C / 0x0D | GPPUA / GPPUB | 0x00 | 100 kOhm internal pull-up enable per pin |
0x12 / 0x13 | GPIOA / GPIOB | Pin state | Port read/write registers |
0x0E-0x11 | INTFA..INTCAPB | Latched state | Interrupt 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.yamlFault-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